Skip to content

Commit

Permalink
[ci] Run cpp tests via run_tests.py (#5035)
Browse files Browse the repository at this point in the history
* [ci] Run cpp tests via run_tests.py

* default to False

* enable cpp on win
  • Loading branch information
k-ye authored May 26, 2022
1 parent cdc07a5 commit 64b8c2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/scripts/unix_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ ti diagnose
ti changelog
echo "wanted archs: $TI_WANTED_ARCHS"

TI_PATH=$(python3 -c "import taichi;print(taichi.__path__[0])" | tail -1)
TI_LIB_DIR="$TI_PATH/_lib/runtime" ./build/taichi_cpp_tests
python3 tests/run_tests.py --cpp

if [ -z "$GPU_TEST" ]; then
if [[ $PLATFORM == *"m1"* ]]; then
Expand Down
1 change: 1 addition & 0 deletions ci/windows/win_build_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ python setup.py develop
WriteInfo("Build finished")

WriteInfo("Testing Taichi")
python tests/run_tests.py --cpp
python tests/run_tests.py -vr2 -t2 -k "not torch and not paddle" -a cpu
WriteInfo("Test finished")
5 changes: 3 additions & 2 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def test():
parser.add_argument('-c',
'--cpp',
dest='cpp',
default=True,
default=False,
action='store_true',
help='Run the C++ tests')
help='Only run the C++ tests')
parser.add_argument('-s',
'--show',
dest='show_output',
Expand Down Expand Up @@ -209,6 +209,7 @@ def test():

if args.cpp:
_test_cpp()
return

if _test_python(args) != 0:
exit(1)
Expand Down

0 comments on commit 64b8c2a

Please sign in to comment.