Skip to content

Commit 8c7aeaa

Browse files
committed
WIP: testing if copying in ci is necessary
1 parent 9311132 commit 8c7aeaa

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.github/workflows/test-pass.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ jobs:
5050
run: |
5151
ls ${{github.workspace}}/build/Release
5252
53-
- name: Copying the dlls
54-
run: |
55-
cp ${{github.workspace}}/build/bin/Release/diffCheck.dll ${{github.workspace}}/tests/integration_tests/pybinds_tests
56-
cp ${{github.workspace}}/build/bin/Release/Open3D.dll ${{github.workspace}}/tests/integration_tests/pybinds_tests
57-
cp ${{github.workspace}}/build/Release/*.pyd ${{github.workspace}}/tests/integration_tests/pybinds_tests
53+
# - name: Copying the dlls
54+
# run: |
55+
# cp ${{github.workspace}}/build/bin/Release/diffCheck.dll ${{github.workspace}}/tests/integration_tests/pybinds_tests
56+
# cp ${{github.workspace}}/build/bin/Release/Open3D.dll ${{github.workspace}}/tests/integration_tests/pybinds_tests
57+
# cp ${{github.workspace}}/build/Release/*.pyd ${{github.workspace}}/tests/integration_tests/pybinds_tests
5858

5959
# TODO: debug
6060
- name: test if the dlls are copied

tests/integration_tests/pybinds_tests/test_pybind_units.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
def test_dfb_test_simple():
2323
assert dfb.dfb_test.test() == True, "The test function should return True"
2424

25+
# getting the test data pahts
26+
def get_ply_cloud_roof_quarter_path():
27+
base_test_data_dir = os.getenv('TEST_DATA_DIR', os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'test_data')))
28+
ply_file_path = os.path.join(base_test_data_dir, "roof_quarter.ply")
29+
if not os.path.exists(ply_file_path):
30+
raise FileNotFoundError(f"PLY file not found at: {ply_file_path}")
31+
return ply_file_path
32+
2533
#------------------------------------------------------------------------------
2634
# dfb_geometry namespace
2735
#------------------------------------------------------------------------------
@@ -37,11 +45,11 @@ def test_DFPointCloud_init():
3745

3846
def test_DFPointCloud_load_from_PLY():
3947
pc = dfb.dfb_geometry.DFPointCloud()
40-
test_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'test_data'))
41-
ply_file_path = os.path.join(test_data_dir, "roof_quarter.ply")
42-
if not os.path.exists(ply_file_path):
43-
raise FileNotFoundError(f"PLY file not found at: {ply_file_path}")
44-
pc.load_from_PLY(ply_file_path)
48+
# test_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'test_data'))
49+
# ply_file_path = os.path.join(test_data_dir, "roof_quarter.ply")
50+
# if not os.path.exists(ply_file_path):
51+
# raise FileNotFoundError(f"PLY file not found at: {ply_file_path}")
52+
pc.load_from_PLY(get_ply_cloud_roof_quarter_path())
4553

4654
assert pc.points.__len__() == 7379, "DFPointCloud should have 7379 points"
4755
assert pc.normals.__len__() == 7379, "DFPointCloud should have 7379 normals"
@@ -50,11 +58,11 @@ def test_DFPointCloud_load_from_PLY():
5058
@pytest.fixture
5159
def create_DFPointCloudSampleRoof():
5260
df_pcd = dfb.dfb_geometry.DFPointCloud()
53-
test_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'test_data'))
54-
ply_file_path = os.path.join(test_data_dir, "roof_quarter.ply")
55-
if not os.path.exists(ply_file_path):
56-
raise FileNotFoundError(f"PLY file not found at: {ply_file_path}")
57-
df_pcd.load_from_PLY(ply_file_path)
61+
# test_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'test_data'))
62+
# ply_file_path = os.path.join(test_data_dir, "roof_quarter.ply")
63+
# if not os.path.exists(ply_file_path):
64+
# raise FileNotFoundError(f"PLY file not found at: {ply_file_path}")
65+
df_pcd.load_from_PLY(get_ply_cloud_roof_quarter_path())
5866
yield df_pcd
5967

6068
def test_DFPointCloud_properties(create_DFPointCloudSampleRoof):

0 commit comments

Comments
 (0)