Skip to content

Commit 54cfb0d

Browse files
YLouWashUmeta-codesync[bot]
authored andcommitted
{Feature} Re-enable unit tests on external CI. (#302)
Summary: Pull Request resolved: #302 This diff adds back the external CI to projectaria tools, previously disabled because of data sharing limitation. Reviewed By: SeaOtocinclus Differential Revision: D86156158 fbshipit-source-id: edf5fdf691faac0494981a5259adc40217a4a171
1 parent 23e4e8f commit 54cfb0d

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

.github/workflows/build-and-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ jobs:
7171
run: |
7272
mkdir build
7373
cmake -DCMAKE_BUILD_TYPE=RELEASE -S . -B build \
74-
-DBUILD_UNIT_TEST=OFF \
74+
-DBUILD_UNIT_TEST=ON \
7575
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
7676
7777
- name: C++ - Build and Test
7878
shell: bash
7979
run: |
8080
cd build
8181
make -j8
82-
# ctest -j # TODO: renable after including test data
82+
ctest -j
8383
8484
- name: Set up Python
8585
uses: actions/setup-python@v4
@@ -93,11 +93,11 @@ jobs:
9393
CMAKE_BUILD_PARALLEL_LEVEL=4 pip3 install .
9494
9595
# Run Python unit tests
96-
#export TEST_FOLDER="./data/gen1/"
97-
#export TEST_FOLDER_GEN2="./data/gen2/"
98-
#python3 -m unittest core/python/test/corePyBindTest.py
99-
#python3 -m unittest core/python/test/mpsPyBindTest.py
100-
#python3 -m unittest core/python/sophus/test/sophusPybindTest.py
96+
export TEST_FOLDER="./data/gen1/"
97+
export TEST_FOLDER_GEN2="./data/gen2/"
98+
python3 -m unittest core/python/test/corePyBindTest.py
99+
python3 -m unittest core/python/test/mpsPyBindTest.py
100+
python3 -m unittest core/python/sophus/test/sophusPybindTest.py
101101
102102
- name: Test Python Notebooks
103103
shell: bash

.github/workflows/build-wheels-and-deploy.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,10 @@ jobs:
170170
# Install wheel
171171
python -m pip install dist/*.whl
172172
# Run Python unit tests
173-
# TODO: re-enable tests when test data is available
174-
# export TEST_FOLDER="./data/gen1/"
175-
# export TEST_FOLDER_GEN2="./data/gen2/"
176-
# python -m unittest core/python/test/corePyBindTest.py
177-
# python -m unittest core/python/test/mpsPyBindTest.py
173+
export TEST_FOLDER="./data/gen1/"
174+
export TEST_FOLDER_GEN2="./data/gen2/"
175+
python -m unittest core/python/test/corePyBindTest.py
176+
python -m unittest core/python/test/mpsPyBindTest.py
178177
179178
publish-to-pypi:
180179
name: Publish to Pypi

.github/workflows/test-for-build-wheels.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ jobs:
159159
# Install wheel
160160
python -m pip install dist/*.whl
161161
# Run Python unit tests
162-
# TODO: re-enable tests when test data is available
163-
# export TEST_FOLDER="./data/gen1/"
164-
# export TEST_FOLDER_GEN2="./data/gen2/"
165-
# python -m unittest core/python/test/corePyBindTest.py
166-
# python -m unittest core/python/test/mpsPyBindTest.py
162+
export TEST_FOLDER="./data/gen1/"
163+
export TEST_FOLDER_GEN2="./data/gen2/"
164+
python -m unittest core/python/test/corePyBindTest.py
165+
python -m unittest core/python/test/mpsPyBindTest.py

pixi.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ prepare = "cmake -GNinja -B build -S . -DBUILD_UNIT_TEST=ON -DCMAKE_POLICY_VERSI
2222
build = "cmake --build build --target all"
2323
test = "cd build; ctest -j"
2424

25-
# TODO: re-enable test when we have test data
2625
prepare_and_build = { depends-on = ["prepare", "build"] }
27-
build_and_test = { depends-on = ["prepare_and_build"] }
26+
build_and_test = { depends-on = ["prepare_and_build", "test"] }
2827
run_c = { depends-on = ["build_and_test"] }
2928

3029
#
@@ -37,8 +36,7 @@ test_python = """
3736
python -m unittest core/python/test/mpsPyBindTest.py;
3837
python -m unittest core/python/sophus/test/sophusPybindTest.py;"""
3938

40-
# TODO: re-enable test when we have test data
41-
run_python = { depends-on = ["build_python"]}
39+
run_python = { depends-on = ["build_python", "test_python"]}
4240

4341
#
4442
# Python - PACKAGE
@@ -54,7 +52,7 @@ cmake-generator = "cmake --help"
5452
prepare = "cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_UNIT_TEST=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5"
5553
build = "cmake --build build --config Release -- /nologo /verbosity:minimal /maxcpucount"
5654
# --parallel 4 -- /m
57-
# test = "cd build; ctest -C Release -j"
55+
test = "cd build; ctest -C Release -j"
5856

5957
build_python = "python -m pip install ."
6058

0 commit comments

Comments
 (0)