Skip to content

Commit 9739088

Browse files
committed
Fix conda-build failure due to purged work directory.
Problem: As of conda-build 2.1 the work directory is removed, but the sources are needed to build unit tests. Solution: Specify `source_files` that are needed for the tests.
1 parent d0b2312 commit 9739088

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

conda-recipe/meta.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ test:
2828
- cxxtest
2929
- scons
3030

31+
source_files:
32+
- SConstruct
33+
- site_scons/
34+
- src/SConscript
35+
- src/SConscript.configure
36+
- src/tests/
37+
3138
# commands:
3239
# Execute the run_test.sh script.
3340

conda-recipe/run_test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
MYNCPU=$(( (CPU_COUNT > 8) ? 8 : CPU_COUNT ))
44

5-
# Remove unit tests from the build phase.
6-
scons -C "$SRC_DIR" --clean lib alltests
5+
# Apply sconscript.local customizations.
6+
cp ${RECIPE_DIR}/sconscript.local ./
77

88
# Build the unit tests program using the installed library.
9-
scons -C "$SRC_DIR" -j $MYNCPU alltests prefix=$PREFIX test_installed=true
9+
scons -j $MYNCPU alltests prefix=$PREFIX test_installed=true
1010

1111
# Execute the unit tests.
12-
MYALLTESTSFAST=$(ls -t ${SRC_DIR}/build/fast*/tests/alltests | head -1)
12+
MYALLTESTSFAST=$(ls -t ${PWD}/build/fast*/tests/alltests | head -1)
1313
${MYALLTESTSFAST}

0 commit comments

Comments
 (0)