From 0acdb5c311e11cb6c0ac62b230fe91ab2e82b347 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 15 Oct 2020 20:43:17 +0530 Subject: [PATCH 01/30] New flag --cling-branch to specify particular cling branch Motivated by the need to clone the PR branch for CI in Github Actions. The earlier "branch/branches" tag did not allow binaries to be created. --- tools/packaging/cpt.py | 71 +++++++++++------------------------------- 1 file changed, 18 insertions(+), 53 deletions(-) diff --git a/tools/packaging/cpt.py b/tools/packaging/cpt.py index 2143684f6..16f2e6c8a 100755 --- a/tools/packaging/cpt.py +++ b/tools/packaging/cpt.py @@ -212,18 +212,10 @@ def fetch_llvm(llvm_revision): return def checkout(): - if LLVM_BRANCH: - exec_subprocess_call('git checkout %s' % LLVM_BRANCH, srcdir) - else: - exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, srcdir) + exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, srcdir) def get_fresh_llvm(): - if LLVM_BRANCH: - exec_subprocess_call('git clone --depth=10 --branch %s %s %s' - % (LLVM_BRANCH, LLVM_GIT_URL, srcdir), workdir) - else: - exec_subprocess_call('git clone %s %s' % (LLVM_GIT_URL, srcdir), workdir) - + exec_subprocess_call('git clone %s %s' % (LLVM_GIT_URL, srcdir), workdir) checkout() def update_old_llvm(): @@ -232,13 +224,9 @@ def update_old_llvm(): # exec_subprocess_call('git clean -f -x -d', srcdir) checkout() - - if LLVM_BRANCH: - exec_subprocess_call('git pull origin %s' % LLVM_BRANCH, srcdir) - else: - exec_subprocess_call('git fetch --tags', srcdir) - exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' - % llvm_revision, srcdir) + exec_subprocess_call('git fetch --tags', srcdir) + exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' + % llvm_revision, srcdir) if os.path.isdir(srcdir): update_old_llvm() @@ -346,18 +334,10 @@ def fetch_clang(llvm_revision): global clangdir clangdir = os.path.join(dir, 'clang') def checkout(): - if CLANG_BRANCH: - exec_subprocess_call('git checkout %s' % CLANG_BRANCH, clangdir) - else: - exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, clangdir) + exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, clangdir) def get_fresh_clang(): - if CLANG_BRANCH: - exec_subprocess_call('git clone --depth=10 --branch %s %s' - % (CLANG_BRANCH, CLANG_GIT_URL), dir) - else: - exec_subprocess_call('git clone %s' % CLANG_GIT_URL, dir) - + exec_subprocess_call('git clone %s' % CLANG_GIT_URL, dir) checkout() def update_old_clang(): @@ -368,12 +348,9 @@ def update_old_clang(): exec_subprocess_call('git fetch --tags', clangdir) checkout() - if CLANG_BRANCH: - exec_subprocess_call('git pull origin %s' % CLANG_BRANCH, clangdir) - else: - exec_subprocess_call('git fetch --tags', clangdir) - exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' % llvm_revision, - clangdir) + exec_subprocess_call('git fetch --tags', clangdir) + exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' % llvm_revision, + clangdir) if os.path.isdir(clangdir): update_old_clang() @@ -582,9 +559,8 @@ def compile(arg): build.make('clang cling' if CLING_BRANCH else 'cling') - if not CLING_BRANCH: - box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) - build.make('install') + box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) + build.make('install') if TRAVIS_BUILD_DIR: ### Run cling once, dumping the include paths, helps debug issues @@ -622,9 +598,8 @@ def compile_for_binary(arg): box_draw('Building %s (using %d cores)' % ("cling", multiprocessing.cpu_count())) exec_subprocess_call('make -j%d %s' % (multiprocessing.cpu_count(), "cling"), LLVM_OBJ_ROOT) - if not CLING_BRANCH: - box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) - build.make('install') + box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) + build.make('install') if TRAVIS_BUILD_DIR: ### Run cling once, dumping the include paths, helps debug issues @@ -1886,6 +1861,7 @@ def make_dmg(): default='http://root.cern.ch/git/clang.git') parser.add_argument('--with-cling-url', action='store', help='Specify an alternate URL of Cling repo', default='https://github.com/root-project/cling.git') +parser.add_argument('--cling-branch', help='Specify a particular Cling branch') parser.add_argument('--with-binary-llvm', help='Download LLVM binary and use it to build Cling in dev mode', action='store_true') parser.add_argument('--with-llvm-tar', help='Download and use LLVM binary release tar to build Cling for debugging', action='store_true') @@ -2043,13 +2019,9 @@ def custom_input(prompt, always_yes=False): parser.print_help() raise SystemExit -CLING_BRANCH = CLANG_BRANCH = LLVM_BRANCH = None -if args['current_dev']: - cDev = args['current_dev'] - if cDev.startswith('branch:'): - CLING_BRANCH = CLANG_BRANCH = LLVM_BRANCH = cDev[7:] - elif cDev.startswith('branches:'): - CLING_BRANCH, CLANG_BRANCH, LLVM_BRANCH = cDev[9:].split(',') +CLING_BRANCH = None +if args['current_dev'] and args['cling_branch']: + CLING_BRANCH = args['cling_branch'] print('Cling Packaging Tool (CPT)') print('Arguments vector: ' + str(sys.argv)) @@ -2344,13 +2316,6 @@ def custom_input(prompt, always_yes=False): make_dmg() cleanup() - elif args['current_dev'].startswith('branch'): - compile(os.path.join(workdir, 'cling-' + VERSION.replace('-' + REVISION[:7], ''))) - #install_prefix() - if not args['no_test']: - test_cling() - cleanup() - elif args['current_dev'] == 'pkg': compile(os.path.join(workdir, 'cling-' + DIST + '-' + REV + '-' + platform.machine().lower() + '-' + VERSION)) install_prefix() From ac1625a5fd82a27f9e1abe9f2614b61fd97398c5 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Tue, 17 Dec 2019 11:18:18 +0530 Subject: [PATCH 02/30] Use Github Actions for CI. --- .github/workflows/ci.yml | 155 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..c28926e4e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,155 @@ +name: Cling CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + + include: + - name: ubuntu-16.04-gcc-4.8-compile + os: ubuntu-16.04 + compiler: gcc + version: "4.8" + + - name: ubuntu-16.04-gcc-5 + os: ubuntu-16.04 + compiler: gcc + version: "5" + + - name: ubuntu-16.04-gcc-6 + os: ubuntu-16.04 + compiler: gcc + version: "6" + + - name: ubuntu-16.04-gcc-7 + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-gcc-7-compile + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-gcc-7-notar + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-clang-3.9 + os: ubuntu-16.04 + compiler: clang + version: "3.9" + + - name: ubuntu-16.04-clang-6 + os: ubuntu-16.04 + compiler: clang + version: "6.0" + + - name: ubuntu-16.04-clang-6-compile + os: ubuntu-16.04 + compiler: clang + version: "6.0" + + - name: ubuntu-18.04-gcc-7-notar + os: ubuntu-18.04 + compiler: gcc + version: "7" + + - name: ubuntu-18.04-gcc-7-compile + os: ubuntu-18.04 + compiler: gcc + version: "7" + + - name: ubuntu-18.04-clang-7-notar + os: ubuntu-18.04 + compiler: clang + version: "7" + + - name: macos-xcode-11.2.1 + os: macOS-latest + compiler: clang + xcode-version: "11.2.1" + + - name: macos-xcode-11.2.1-compile + os: macOS-latest + compiler: clang + xcode-version: "11.2.1" + + # - name: macos-xcode-11.2.1-notar + # os: macOS-latest + # compiler: clang + # xcode-version: "11.2.1" + + - name: macos-gcc-9-compile + os: macOS-latest + compiler: gcc + version: "9" + + - name: ubuntu-20.04-clang-7-compile + os: ubuntu-20.04 + compiler: clang + version: "7" + + - name: ubuntu-20.04-gcc-7-compile + os: ubuntu-20.04 + compiler: gcc + version: "7" + + steps: + - uses: actions/checkout@v2 + - name: Setup compiler on Linux + run: | + sudo apt-get update + if [ "${{ matrix.compiler }}" = "gcc" ]; then + sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }} + echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV + else + sudo apt-get install -y clang-${{ matrix.version }} + echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV + fi + if: runner.os == 'Linux' + shell: bash + - name: Setup compiler on OS X + run: | + curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install + if [ "${{ matrix.compiler }}" = "gcc" ]; then + brew install gcc@${{ matrix.version }} + echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV + else + sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app + echo "CC=clang" >> $GITHUB_ENV + echo "CXX=clang++" >> $GITHUB_ENV + fi + if: runner.os == 'macOS' + - name: Execute cpt + run: | + if [[ "${{ matrix.compiler }}" = "gcc" && "${{ matrix.version }}" = "7" ]]; then + export CLING_BUILD_FLAGS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON" + if [ "${{ matrix.os }}" != "macOS-latest" ]; then + export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCXX_EXTENSIONS=OFF" + fi + fi + export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCLANG_ENABLE_ARCMT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_ENABLE_WARNINGS=OFF -DCLING_ENABLE_WARNINGS=ON" + if [[ ${{ matrix.name }} == *"compile"* ]]; then + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} + elif [[ ${{ matrix.name }} == *"notar"* ]]; then + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm + else + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm --with-llvm-tar + fi + working-directory: tools/packaging/ From ce1f6d5ca97840c9334264c3e36e4888c79c02bc Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Fri, 16 Oct 2020 14:38:31 +0530 Subject: [PATCH 03/30] Setup Github Actions CI for Windows --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c28926e4e..60cf6b298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,14 @@ jobs: compiler: gcc version: "7" + - name: windows-2019-ninja + os: windows-2019 + generator: Ninja + + - name: windows-2019-visual-studio + os: windows-2019 + generator: Visual Studio 16 2019 + steps: - uses: actions/checkout@v2 - name: Setup compiler on Linux @@ -136,7 +144,10 @@ jobs: echo "CXX=clang++" >> $GITHUB_ENV fi if: runner.os == 'macOS' - - name: Execute cpt + - name: Setup ninja for Windows + uses: seanmiddleditch/gha-setup-ninja@master + if: runner.os == 'Windows' && matrix.generator == 'Ninja' + - name: Execute cpt on Linux/OS X run: | if [[ "${{ matrix.compiler }}" = "gcc" && "${{ matrix.version }}" = "7" ]]; then export CLING_BUILD_FLAGS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON" @@ -153,3 +164,10 @@ jobs: ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm --with-llvm-tar fi working-directory: tools/packaging/ + if: runner.os != 'Windows' + - name: Execute cpt on Windows + run: | + python cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --skip-cleanup + working-directory: tools/packaging/ + shell: bash + if: runner.os == 'Windows' From 17b92e7318535eabfef528960588aae1661ab402 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 12:55:49 +0530 Subject: [PATCH 04/30] Fix Windows build Only build plugins if LLVM_ENABLE_PLUGINS is ON --- tools/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 67881875f..d43658d5d 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -14,4 +14,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../lib/UserInterface/textinput add_subdirectory(demo) endif() -add_subdirectory(plugins) +if (LLVM_ENABLE_PLUGINS) + add_subdirectory(plugins) +endif() From 87b8b3acd98560b4196148e20b16faacdf1d0c8c Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 15:12:54 +0530 Subject: [PATCH 05/30] Try to fix Windows Ninja build --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60cf6b298..467429948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,7 +167,8 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - python cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --skip-cleanup - working-directory: tools/packaging/ - shell: bash + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + working-directory: tools\packaging\ + shell: cmd if: runner.os == 'Windows' From 47df9ef8198a8aeeea09cab0dd792f557fa9a0db Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 15:35:28 +0530 Subject: [PATCH 06/30] Fix tests for Windows --- test/Autoloading/AutoForwarding.C | 2 +- test/CodeUnloading/AtExit.C | 4 ++-- test/Interfaces/transactionReuse.C | 2 +- test/Lookup/data.C | 2 +- test/Lookup/named.C | 2 +- test/Lookup/scope.C | 2 +- test/Lookup/tag.C | 2 +- test/Lookup/template.C | 2 +- test/NullDeref/BinOp.C | 2 +- test/NullDeref/Cast.C | 2 +- test/NullDeref/ExecutionTermination.C | 2 +- test/NullDeref/InvalidMemoryAddress.C | 2 +- test/NullDeref/Load.C | 2 +- test/NullDeref/MethodCalls.C | 2 +- test/NullDeref/NonNullArg.C | 2 +- test/NullDeref/NonNullArgCustom.C | 2 +- test/Plugins/Simple.C | 2 +- test/Prompt/ValuePrinter/Regression.C | 2 +- test/Prompt/ValuePrinter/Strings.C | 2 +- test/Utils/Transform.C | 2 +- test/lit.cfg | 2 ++ 21 files changed, 23 insertions(+), 21 deletions(-) diff --git a/test/Autoloading/AutoForwarding.C b/test/Autoloading/AutoForwarding.C index 428442329..979021c74 100644 --- a/test/Autoloading/AutoForwarding.C +++ b/test/Autoloading/AutoForwarding.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -I%S -Xclang -verify +// RUN: %cat %s | %cling -I%S -Xclang -verify // XFAIL: vanilla-cling // Test FwdPrinterTest diff --git a/test/CodeUnloading/AtExit.C b/test/CodeUnloading/AtExit.C index cc391b166..5591598b3 100644 --- a/test/CodeUnloading/AtExit.C +++ b/test/CodeUnloading/AtExit.C @@ -6,8 +6,8 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s -// FIXME: cat %s | %cling -fsyntax-only -Xclang -verify 2>&1 +// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s +// FIXME: %cat %s | %cling -fsyntax-only -Xclang -verify 2>&1 // Test to check functions registered via atexit are intercepted, and __dso_handle // is properly overridden in for child interpreters. diff --git a/test/Interfaces/transactionReuse.C b/test/Interfaces/transactionReuse.C index 7bfff760e..7654be473 100644 --- a/test/Interfaces/transactionReuse.C +++ b/test/Interfaces/transactionReuse.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s // This test makes sure the interpreter doesn't create many useless empty // transactions. diff --git a/test/Lookup/data.C b/test/Lookup/data.C index d7fd242c7..81cafcb21 100644 --- a/test/Lookup/data.C +++ b/test/Lookup/data.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s // Test lookupData .rawInput 1 diff --git a/test/Lookup/named.C b/test/Lookup/named.C index a647c28c3..cf28f0e12 100644 --- a/test/Lookup/named.C +++ b/test/Lookup/named.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/scope.C b/test/Lookup/scope.C index 924b21924..84da30d66 100644 --- a/test/Lookup/scope.C +++ b/test/Lookup/scope.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s // Test findScope, which is essentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/Lookup/tag.C b/test/Lookup/tag.C index 3667f55f1..c22b7d50c 100644 --- a/test/Lookup/tag.C +++ b/test/Lookup/tag.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/template.C b/test/Lookup/template.C index 9d23dab81..62544927c 100644 --- a/test/Lookup/template.C +++ b/test/Lookup/template.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s // Test findClassTemplate, which is esentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/NullDeref/BinOp.C b/test/NullDeref/BinOp.C index 3785a1e18..cb5d0b149 100644 --- a/test/NullDeref/BinOp.C +++ b/test/NullDeref/BinOp.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0; diff --git a/test/NullDeref/Cast.C b/test/NullDeref/Cast.C index 7172e3e90..8cd329dba 100644 --- a/test/NullDeref/Cast.C +++ b/test/NullDeref/Cast.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0;; diff --git a/test/NullDeref/ExecutionTermination.C b/test/NullDeref/ExecutionTermination.C index 3eb993b8d..4eff3d6d5 100644 --- a/test/NullDeref/ExecutionTermination.C +++ b/test/NullDeref/ExecutionTermination.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 //This file checks that the execution ends after a null prt dereference. diff --git a/test/NullDeref/InvalidMemoryAddress.C b/test/NullDeref/InvalidMemoryAddress.C index 9ece3ab0d..bed71e800 100644 --- a/test/NullDeref/InvalidMemoryAddress.C +++ b/test/NullDeref/InvalidMemoryAddress.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 //This file checks a dereference of an invalid memory address pointer.. int *p = (int*)0x1; diff --git a/test/NullDeref/Load.C b/test/NullDeref/Load.C index cc2c1a34b..1400cd1b9 100644 --- a/test/NullDeref/Load.C +++ b/test/NullDeref/Load.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p; diff --git a/test/NullDeref/MethodCalls.C b/test/NullDeref/MethodCalls.C index 60a5ba380..fb6d6f472 100644 --- a/test/NullDeref/MethodCalls.C +++ b/test/NullDeref/MethodCalls.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 // This test verifies that we get nice warning if a method on null ptr object is // called. diff --git a/test/NullDeref/NonNullArg.C b/test/NullDeref/NonNullArg.C index a2bac16b5..6a21d8f1e 100644 --- a/test/NullDeref/NonNullArg.C +++ b/test/NullDeref/NonNullArg.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s // XFAIL: powerpc64 //This file checks a call instruction. The called function has arguments with nonnull attribute. extern "C" int printf(const char* fmt, ...); diff --git a/test/NullDeref/NonNullArgCustom.C b/test/NullDeref/NonNullArgCustom.C index ad70fa5ec..a3023868e 100644 --- a/test/NullDeref/NonNullArgCustom.C +++ b/test/NullDeref/NonNullArgCustom.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cat %s | %cling -Xclang -verify // XFAIL: powerpc64 // We must be able to handle cases where, there is a custom function that has diff --git a/test/Plugins/Simple.C b/test/Plugins/Simple.C index f44cbc260..9baf44eb7 100644 --- a/test/Plugins/Simple.C +++ b/test/Plugins/Simple.C @@ -1,4 +1,4 @@ -// RUN: cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s +// RUN: %cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s // CHECK:Action::ParseArgs // CHECK-NEXT:Action::CreateASTConsumer diff --git a/test/Prompt/ValuePrinter/Regression.C b/test/Prompt/ValuePrinter/Regression.C index 23543fc6a..ef3457e3b 100644 --- a/test/Prompt/ValuePrinter/Regression.C +++ b/test/Prompt/ValuePrinter/Regression.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling 2>&1 | FileCheck %s +// RUN: %cat %s | %cling 2>&1 | FileCheck %s // This file should be used as regression test for the value printing subsystem // Reproducers of fixed bugs should be put here diff --git a/test/Prompt/ValuePrinter/Strings.C b/test/Prompt/ValuePrinter/Strings.C index ff2c0dc8d..769c55396 100644 --- a/test/Prompt/ValuePrinter/Strings.C +++ b/test/Prompt/ValuePrinter/Strings.C @@ -7,7 +7,7 @@ //------------------------------------------------------------------------------ // Windows wants -Wno-deprecated-declarations -//RUN: cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s +//RUN: %cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s #include #ifdef _WIN32 diff --git a/test/Utils/Transform.C b/test/Utils/Transform.C index 9701545ee..1d4b1b093 100644 --- a/test/Utils/Transform.C +++ b/test/Utils/Transform.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s // The test verifies the expected behavior in cling::utils::Transform class, // which is supposed to provide different transformation of AST nodes and types. diff --git a/test/lit.cfg b/test/lit.cfg index c9441bb30..6948487a2 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -294,10 +294,12 @@ if IsWindows and execute_external: config.substitutions.append(('%mkdir', 'mkdir')) config.substitutions.append(('%rmdir', 'rmdir /s /q')) config.substitutions.append(('%rm', 'del /s /q')) + config.substitutions.append(('%cat', 'type')) else: config.substitutions.append(('%mkdir', 'mkdir -p')) config.substitutions.append(('%rmdir', 'rm -rf')) config.substitutions.append(('%rm', 'rm -f')) + config.substitutions.append(('%cat', 'cat')) # Don't add tests to history os.environ['CLING_NOHISTORY'] = '1' From 782522187f65712be1f13baf880709f4305163a7 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 19:05:40 +0530 Subject: [PATCH 07/30] Change arch --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 467429948..4dafee071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,8 +167,8 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x86 + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x86\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x86\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ shell: cmd if: runner.os == 'Windows' From 4f4d2624191a131eb5d0f2281b97cda02394d670 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 20:58:00 +0530 Subject: [PATCH 08/30] Revert "Change arch" This reverts commit 39c481c18dd651e06262e3e92865e590ceb5449a. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dafee071..467429948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,8 +167,8 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x86 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x86\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x86\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ shell: cmd if: runner.os == 'Windows' From 2ce63f33003c55989cab8ff68f2fc5cf81c45a46 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 23:29:38 +0530 Subject: [PATCH 09/30] Try to fix Windows Ninja build --- tools/demo/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/demo/CMakeLists.txt b/tools/demo/CMakeLists.txt index 992cac990..d49979d60 100644 --- a/tools/demo/CMakeLists.txt +++ b/tools/demo/CMakeLists.txt @@ -40,7 +40,7 @@ set_target_properties(cling-demo if(MSVC) set_target_properties(cling-demo PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) set_property(TARGET cling-demo APPEND_STRING PROPERTY LINK_FLAGS - "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z - /EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z - /EXPORT:cling_runtime_internal_throwIfInvalidPointer") + "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z" + "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z" + "/EXPORT:cling_runtime_internal_throwIfInvalidPointer") endif() From 729daa50538d9f6c9d6b27407a327a095d9235a9 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 23:38:49 +0530 Subject: [PATCH 10/30] Try to fix tests --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 467429948..26754407f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,6 +167,7 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | + set LIT_USE_INTERNAL_SHELL=0 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ From a2f45a3c21b29ee3fe71412930a142b58227ab76 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Wed, 21 Oct 2020 23:39:26 +0530 Subject: [PATCH 11/30] Do not explicitly export symbols Test if Ninja generator now works --- tools/demo/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/demo/CMakeLists.txt b/tools/demo/CMakeLists.txt index d49979d60..4a9e3f510 100644 --- a/tools/demo/CMakeLists.txt +++ b/tools/demo/CMakeLists.txt @@ -39,8 +39,4 @@ set_target_properties(cling-demo if(MSVC) set_target_properties(cling-demo PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) - set_property(TARGET cling-demo APPEND_STRING PROPERTY LINK_FLAGS - "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z" - "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z" - "/EXPORT:cling_runtime_internal_throwIfInvalidPointer") endif() From fcae5bbc1705185e63251b09888fcf388a9b8f4e Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 09:45:50 +0530 Subject: [PATCH 12/30] Revert "Do not explicitly export symbols" This reverts commit a2f45a3c21b29ee3fe71412930a142b58227ab76. --- tools/demo/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/demo/CMakeLists.txt b/tools/demo/CMakeLists.txt index 4a9e3f510..d49979d60 100644 --- a/tools/demo/CMakeLists.txt +++ b/tools/demo/CMakeLists.txt @@ -39,4 +39,8 @@ set_target_properties(cling-demo if(MSVC) set_target_properties(cling-demo PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) + set_property(TARGET cling-demo APPEND_STRING PROPERTY LINK_FLAGS + "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z" + "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z" + "/EXPORT:cling_runtime_internal_throwIfInvalidPointer") endif() From 9c58611d78ece37ecdf83070a56be9b2da1da957 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 09:45:59 +0530 Subject: [PATCH 13/30] Revert "Try to fix Windows Ninja build" This reverts commit 2ce63f33003c55989cab8ff68f2fc5cf81c45a46. --- tools/demo/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/demo/CMakeLists.txt b/tools/demo/CMakeLists.txt index d49979d60..992cac990 100644 --- a/tools/demo/CMakeLists.txt +++ b/tools/demo/CMakeLists.txt @@ -40,7 +40,7 @@ set_target_properties(cling-demo if(MSVC) set_target_properties(cling-demo PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) set_property(TARGET cling-demo APPEND_STRING PROPERTY LINK_FLAGS - "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z" - "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z" - "/EXPORT:cling_runtime_internal_throwIfInvalidPointer") + "/EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00D_K@Z + /EXPORT:?setValueNoAlloc@internal@runtime@cling@@YAXPEAX00DM@Z + /EXPORT:cling_runtime_internal_throwIfInvalidPointer") endif() From 2ae36e2fc5467e51bbac12ca38b2b08f04c18e28 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 11:40:30 +0530 Subject: [PATCH 14/30] Try and fix Windows tests --- .github/workflows/ci.yml | 1 - test/lit.cfg | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26754407f..467429948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,7 +167,6 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - set LIT_USE_INTERNAL_SHELL=0 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ diff --git a/test/lit.cfg b/test/lit.cfg index 6948487a2..52204790f 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -286,20 +286,20 @@ else: if platform.system() in ['Windows']: config.substitutions.append(('%dllexport', '"__declspec(dllexport)"')) config.substitutions.append(('%fPIC', '')) + config.substitutions.append(('%cat', 'type')) else: config.substitutions.append(('%dllexport', '')) config.substitutions.append(('%fPIC', '-fPIC')) + config.substitutions.append(('%cat', 'cat')) if IsWindows and execute_external: config.substitutions.append(('%mkdir', 'mkdir')) config.substitutions.append(('%rmdir', 'rmdir /s /q')) config.substitutions.append(('%rm', 'del /s /q')) - config.substitutions.append(('%cat', 'type')) else: config.substitutions.append(('%mkdir', 'mkdir -p')) config.substitutions.append(('%rmdir', 'rm -rf')) config.substitutions.append(('%rm', 'rm -f')) - config.substitutions.append(('%cat', 'cat')) # Don't add tests to history os.environ['CLING_NOHISTORY'] = '1' From bb462a05735fb83f4e196d6e8e8c067c986278c5 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 15:28:38 +0530 Subject: [PATCH 15/30] try to fix tests on Windows --- test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lit.cfg b/test/lit.cfg index 52204790f..51bd178f6 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -286,7 +286,7 @@ else: if platform.system() in ['Windows']: config.substitutions.append(('%dllexport', '"__declspec(dllexport)"')) config.substitutions.append(('%fPIC', '')) - config.substitutions.append(('%cat', 'type')) + config.substitutions.append(('%cat', 'Get-Content -Path')) else: config.substitutions.append(('%dllexport', '')) config.substitutions.append(('%fPIC', '-fPIC')) From 9af2faf6d1acf3a4678bf2e52cd909b4c69bd911 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 15:36:37 +0530 Subject: [PATCH 16/30] Trying use cmd /c type to fix tests --- test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lit.cfg b/test/lit.cfg index 51bd178f6..4bcfb4811 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -286,7 +286,7 @@ else: if platform.system() in ['Windows']: config.substitutions.append(('%dllexport', '"__declspec(dllexport)"')) config.substitutions.append(('%fPIC', '')) - config.substitutions.append(('%cat', 'Get-Content -Path')) + config.substitutions.append(('%cat', 'cmd /c type')) else: config.substitutions.append(('%dllexport', '')) config.substitutions.append(('%fPIC', '-fPIC')) From 04af02c547bd0873724684e093526db740987ceb Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:15:03 +0530 Subject: [PATCH 17/30] Go back to using type for Windows tests --- test/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lit.cfg b/test/lit.cfg index 4bcfb4811..52204790f 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -286,7 +286,7 @@ else: if platform.system() in ['Windows']: config.substitutions.append(('%dllexport', '"__declspec(dllexport)"')) config.substitutions.append(('%fPIC', '')) - config.substitutions.append(('%cat', 'cmd /c type')) + config.substitutions.append(('%cat', 'type')) else: config.substitutions.append(('%dllexport', '')) config.substitutions.append(('%fPIC', '-fPIC')) From 41884dd3029dbacbd7fbd4742cf76b0651358ef7 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:16:12 +0530 Subject: [PATCH 18/30] Use Powershell instead of cmd --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 467429948..edd879f6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,8 +167,7 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ - shell: cmd if: runner.os == 'Windows' From d785e2b255a97b35047a93171cf1d128ce6049f6 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:21:54 +0530 Subject: [PATCH 19/30] Fix remaining cat in test file --- test/CodeGeneration/Statics.C | 2 +- test/Interfaces/evaluate.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CodeGeneration/Statics.C b/test/CodeGeneration/Statics.C index 67b0ad82d..d284a6a3c 100644 --- a/test/CodeGeneration/Statics.C +++ b/test/CodeGeneration/Statics.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s +// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s #include diff --git a/test/Interfaces/evaluate.C b/test/Interfaces/evaluate.C index cbec8ea80..82c310aa5 100644 --- a/test/Interfaces/evaluate.C +++ b/test/Interfaces/evaluate.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/Value.h" From f6a0a5455c95f49d07cd6e1738128c94a54a58ed Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:32:38 +0530 Subject: [PATCH 20/30] Try to fix powershell --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edd879f6e..b016bc8d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,6 @@ jobs: - name: Execute cpt on Windows run: | cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER='\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\"' -DCMAKE_CXX_COMPILER='\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\"' -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ if: runner.os == 'Windows' From 5058aa6cc500df0e09d4dcbf492202ace228ba64 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:43:36 +0530 Subject: [PATCH 21/30] Try to fix powershell --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b016bc8d2..7e7afe891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,6 @@ jobs: - name: Execute cpt on Windows run: | cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER='\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\"' -DCMAKE_CXX_COMPILER='\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\"' -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\''" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ if: runner.os == 'Windows' From 52bd5e1aef1b6f80e1dcbc99bde44fcf78494af9 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:49:18 +0530 Subject: [PATCH 22/30] Try to fix Powershell --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e7afe891..4790b0f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,6 @@ jobs: - name: Execute cpt on Windows run: | cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\''" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ if: runner.os == 'Windows' From d289539b22a6640fe473eb4c4737a1a77b56dd02 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 18:54:46 +0530 Subject: [PATCH 23/30] Try to fix Powershell --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4790b0f71..eb9bff391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,6 @@ jobs: - name: Execute cpt on Windows run: | cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G '${{ matrix.generator}}'" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ if: runner.os == 'Windows' From d222556eb1dd542574b31d56c47ef27d5f7fc4a9 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 19:23:42 +0530 Subject: [PATCH 24/30] Try to fix Powershell - Env variable --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb9bff391..edee6080f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,6 @@ jobs: - name: Execute cpt on Windows run: | cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G '${{ matrix.generator}}'" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G '${{ matrix.generator}}'" --with-cling-url=https://github.com/$env:GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ if: runner.os == 'Windows' From 225f7436630deae6568a56a34bdf822c4e1d277e Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 23:35:01 +0530 Subject: [PATCH 25/30] Update Appveyor build with new Cling flags --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e112ed64..ff6433f9e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,8 +53,7 @@ build_script: - tools\packaging\cpt.py ^ --current-dev=tar ^ --with-cling-url=https://github.com/%APPVEYOR_REPO_NAME% ^ - --with-clang-url=http://root.cern.ch/git/clang.git ^ - --with-llvm-url=http://root.cern.ch/git/llvm.git ^ + --cling-branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% ^ --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -G\"%CMAKE_GEN%\"" ^ --skip-cleanup From 493e6ee18de0f08a50365f4581307cb9baa0fce9 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Thu, 22 Oct 2020 23:43:50 +0530 Subject: [PATCH 26/30] Debug Appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ff6433f9e..2a029fd5d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,4 +66,4 @@ init: on_failure: # Your RDP session is limited by overall build time (60 min). # On every failing build, we have to wait for hours... Uncomment the next line if remote access to the machine is really needed (e.g. for debugging) -#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From e6dcc49870c6b08ffdea095feb31b5569599ec85 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Fri, 23 Oct 2020 12:44:34 +0530 Subject: [PATCH 27/30] Revert "Debug Appveyor" This reverts commit 137f4c59343e7443c86092f129335ff54cfb094d. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2a029fd5d..ff6433f9e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,4 +66,4 @@ init: on_failure: # Your RDP session is limited by overall build time (60 min). # On every failing build, we have to wait for hours... Uncomment the next line if remote access to the machine is really needed (e.g. for debugging) -- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From 9bbc9f8e9b207db4fee76b8f8b0a8d4bef03bc27 Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Fri, 23 Oct 2020 13:04:53 +0530 Subject: [PATCH 28/30] Do not use cat for tests --- test/Autoloading/AutoForwarding.C | 2 +- test/CodeGeneration/Statics.C | 2 +- test/CodeUnloading/AtExit.C | 4 ++-- test/Interfaces/evaluate.C | 2 +- test/Interfaces/transactionReuse.C | 2 +- test/Lookup/data.C | 2 +- test/Lookup/named.C | 2 +- test/Lookup/scope.C | 2 +- test/Lookup/tag.C | 2 +- test/Lookup/template.C | 2 +- test/NullDeref/BinOp.C | 2 +- test/NullDeref/Cast.C | 2 +- test/NullDeref/ExecutionTermination.C | 2 +- test/NullDeref/InvalidMemoryAddress.C | 2 +- test/NullDeref/Load.C | 2 +- test/NullDeref/MethodCalls.C | 2 +- test/NullDeref/NonNullArg.C | 2 +- test/NullDeref/NonNullArgCustom.C | 2 +- test/Plugins/Simple.C | 2 +- test/Prompt/ValuePrinter/Regression.C | 2 +- test/Prompt/ValuePrinter/Strings.C | 2 +- test/Utils/Transform.C | 2 +- test/lit.cfg | 2 -- 23 files changed, 23 insertions(+), 25 deletions(-) diff --git a/test/Autoloading/AutoForwarding.C b/test/Autoloading/AutoForwarding.C index 979021c74..523af0992 100644 --- a/test/Autoloading/AutoForwarding.C +++ b/test/Autoloading/AutoForwarding.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -I%S -Xclang -verify +// RUN: %cling -I%S -Xclang -verify < %s // XFAIL: vanilla-cling // Test FwdPrinterTest diff --git a/test/CodeGeneration/Statics.C b/test/CodeGeneration/Statics.C index d284a6a3c..b7b44e2e9 100644 --- a/test/CodeGeneration/Statics.C +++ b/test/CodeGeneration/Statics.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s +// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s #include diff --git a/test/CodeUnloading/AtExit.C b/test/CodeUnloading/AtExit.C index 5591598b3..4623562ca 100644 --- a/test/CodeUnloading/AtExit.C +++ b/test/CodeUnloading/AtExit.C @@ -6,8 +6,8 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s -// FIXME: %cat %s | %cling -fsyntax-only -Xclang -verify 2>&1 +// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s +// FIXME: %cling -fsyntax-only -Xclang -verify 2>&1 < %s // Test to check functions registered via atexit are intercepted, and __dso_handle // is properly overridden in for child interpreters. diff --git a/test/Interfaces/evaluate.C b/test/Interfaces/evaluate.C index 82c310aa5..c579c7dcb 100644 --- a/test/Interfaces/evaluate.C +++ b/test/Interfaces/evaluate.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cling -Xclang -verify < %s | FileCheck %s #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/Value.h" diff --git a/test/Interfaces/transactionReuse.C b/test/Interfaces/transactionReuse.C index 7654be473..289a04483 100644 --- a/test/Interfaces/transactionReuse.C +++ b/test/Interfaces/transactionReuse.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %built_cling -fno-rtti < %s | FileCheck %s // This test makes sure the interpreter doesn't create many useless empty // transactions. diff --git a/test/Lookup/data.C b/test/Lookup/data.C index 81cafcb21..eae421ade 100644 --- a/test/Lookup/data.C +++ b/test/Lookup/data.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test lookupData .rawInput 1 diff --git a/test/Lookup/named.C b/test/Lookup/named.C index cf28f0e12..73891a483 100644 --- a/test/Lookup/named.C +++ b/test/Lookup/named.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/scope.C b/test/Lookup/scope.C index 84da30d66..dbc7c12bd 100644 --- a/test/Lookup/scope.C +++ b/test/Lookup/scope.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test findScope, which is essentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/Lookup/tag.C b/test/Lookup/tag.C index c22b7d50c..40492dea7 100644 --- a/test/Lookup/tag.C +++ b/test/Lookup/tag.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/template.C b/test/Lookup/template.C index 62544927c..3af81c242 100644 --- a/test/Lookup/template.C +++ b/test/Lookup/template.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test findClassTemplate, which is esentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/NullDeref/BinOp.C b/test/NullDeref/BinOp.C index cb5d0b149..71a3c4b12 100644 --- a/test/NullDeref/BinOp.C +++ b/test/NullDeref/BinOp.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0; diff --git a/test/NullDeref/Cast.C b/test/NullDeref/Cast.C index 8cd329dba..b57af91be 100644 --- a/test/NullDeref/Cast.C +++ b/test/NullDeref/Cast.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0;; diff --git a/test/NullDeref/ExecutionTermination.C b/test/NullDeref/ExecutionTermination.C index 4eff3d6d5..ae0c6dc24 100644 --- a/test/NullDeref/ExecutionTermination.C +++ b/test/NullDeref/ExecutionTermination.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks that the execution ends after a null prt dereference. diff --git a/test/NullDeref/InvalidMemoryAddress.C b/test/NullDeref/InvalidMemoryAddress.C index bed71e800..5f5421789 100644 --- a/test/NullDeref/InvalidMemoryAddress.C +++ b/test/NullDeref/InvalidMemoryAddress.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a dereference of an invalid memory address pointer.. int *p = (int*)0x1; diff --git a/test/NullDeref/Load.C b/test/NullDeref/Load.C index 1400cd1b9..2e650ec0f 100644 --- a/test/NullDeref/Load.C +++ b/test/NullDeref/Load.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p; diff --git a/test/NullDeref/MethodCalls.C b/test/NullDeref/MethodCalls.C index fb6d6f472..3286a1ef7 100644 --- a/test/NullDeref/MethodCalls.C +++ b/test/NullDeref/MethodCalls.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 // This test verifies that we get nice warning if a method on null ptr object is // called. diff --git a/test/NullDeref/NonNullArg.C b/test/NullDeref/NonNullArg.C index 6a21d8f1e..60fc87516 100644 --- a/test/NullDeref/NonNullArg.C +++ b/test/NullDeref/NonNullArg.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cling -Xclang -verify < %s | FileCheck %s // XFAIL: powerpc64 //This file checks a call instruction. The called function has arguments with nonnull attribute. extern "C" int printf(const char* fmt, ...); diff --git a/test/NullDeref/NonNullArgCustom.C b/test/NullDeref/NonNullArgCustom.C index a3023868e..9f0a4fd17 100644 --- a/test/NullDeref/NonNullArgCustom.C +++ b/test/NullDeref/NonNullArgCustom.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 // We must be able to handle cases where, there is a custom function that has diff --git a/test/Plugins/Simple.C b/test/Plugins/Simple.C index 9baf44eb7..e3b1ea36b 100644 --- a/test/Plugins/Simple.C +++ b/test/Plugins/Simple.C @@ -1,4 +1,4 @@ -// RUN: %cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s +// RUN: %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext < %s | FileCheck %s // CHECK:Action::ParseArgs // CHECK-NEXT:Action::CreateASTConsumer diff --git a/test/Prompt/ValuePrinter/Regression.C b/test/Prompt/ValuePrinter/Regression.C index ef3457e3b..d1513697e 100644 --- a/test/Prompt/ValuePrinter/Regression.C +++ b/test/Prompt/ValuePrinter/Regression.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %cling 2>&1 | FileCheck %s +// RUN: %cling 2>&1 < %s | FileCheck %s // This file should be used as regression test for the value printing subsystem // Reproducers of fixed bugs should be put here diff --git a/test/Prompt/ValuePrinter/Strings.C b/test/Prompt/ValuePrinter/Strings.C index 769c55396..2ff223a86 100644 --- a/test/Prompt/ValuePrinter/Strings.C +++ b/test/Prompt/ValuePrinter/Strings.C @@ -7,7 +7,7 @@ //------------------------------------------------------------------------------ // Windows wants -Wno-deprecated-declarations -//RUN: %cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s +//RUN: %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 < %s | FileCheck %s #include #ifdef _WIN32 diff --git a/test/Utils/Transform.C b/test/Utils/Transform.C index 1d4b1b093..d7da28adb 100644 --- a/test/Utils/Transform.C +++ b/test/Utils/Transform.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: %cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %built_cling -fno-rtti < %s | FileCheck %s // The test verifies the expected behavior in cling::utils::Transform class, // which is supposed to provide different transformation of AST nodes and types. diff --git a/test/lit.cfg b/test/lit.cfg index 52204790f..c9441bb30 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -286,11 +286,9 @@ else: if platform.system() in ['Windows']: config.substitutions.append(('%dllexport', '"__declspec(dllexport)"')) config.substitutions.append(('%fPIC', '')) - config.substitutions.append(('%cat', 'type')) else: config.substitutions.append(('%dllexport', '')) config.substitutions.append(('%fPIC', '-fPIC')) - config.substitutions.append(('%cat', 'cat')) if IsWindows and execute_external: config.substitutions.append(('%mkdir', 'mkdir')) From 7e37b85916e54a7023a9354e7c68df731902fe1d Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Fri, 23 Oct 2020 13:14:07 +0530 Subject: [PATCH 29/30] Go back to using bash for Windows builds --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edee6080f..467429948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,7 +167,8 @@ jobs: if: runner.os != 'Windows' - name: Execute cpt on Windows run: | - cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 - C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -DCMAKE_CXX_COMPILER=\"'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\'" -G '${{ matrix.generator}}'" --with-cling-url=https://github.com/$env:GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --skip-cleanup + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup working-directory: tools\packaging\ + shell: cmd if: runner.os == 'Windows' From b08f2d22dce5b8dce4c43875fc1446d4c72a5f3b Mon Sep 17 00:00:00 2001 From: Pratyush Das Date: Mon, 26 Oct 2020 10:46:01 +0530 Subject: [PATCH 30/30] Check if Windows SSH debug works --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 467429948..e8a894a12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,6 +165,11 @@ jobs: fi working-directory: tools/packaging/ if: runner.os != 'Windows' + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + SSH_PASS: ${{ secrets.SSH_PASS }} - name: Execute cpt on Windows run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64