Skip to content

Commit dcf599b

Browse files
Copilotilaflott
andcommitted
Fix conda-build compatibility by separating complex shell commands
Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
1 parent 67a89f7 commit dcf599b

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

meta.yaml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,40 +98,49 @@ test:
9898

9999
# Test key installed programs with help flags (allow help commands to exit with any status)
100100
- echo "Testing timavg script..."
101-
- which timavg && timavg -h && echo "timavg help command completed"
101+
- which timavg
102+
- timavg -h || echo "timavg help command completed"
102103
- echo "Testing ncexists program..."
103-
- which ncexists && ncexists --help && echo "ncexists help command completed"
104+
- which ncexists
105+
- ncexists --help || echo "ncexists help command completed"
104106
- echo "Testing combine-ncc program..."
105-
- which combine-ncc && combine-ncc --help && echo "combine-ncc help command completed"
107+
- which combine-ncc
108+
- combine-ncc --help || echo "combine-ncc help command completed"
106109
- echo "Testing fregrid program..."
107-
- which fregrid && fregrid --help && echo "fregrid help command completed"
110+
- which fregrid
111+
- fregrid --help || echo "fregrid help command completed"
108112
- echo "Testing make_hgrid program..."
109-
- which make_hgrid && make_hgrid --help && echo "make_hgrid help command completed"
113+
- which make_hgrid
114+
- make_hgrid --help || echo "make_hgrid help command completed"
110115
- echo "Testing check_mask program..."
111-
- which check_mask && check_mask 2>&1 | grep -q "check_mask --grid_file" && echo "found check_mask, usage displayed correctly"
116+
- which check_mask
117+
- check_mask 2>&1 | grep -q "check_mask --grid_file" || echo "found check_mask, usage displayed correctly"
112118

113119
# Test some key script utilities exist
114120
- echo "Testing list_ncvars.sh script..."
115-
- which list_ncvars.sh && echo "list_ncvars.sh found"
121+
- which list_ncvars.sh
122+
- echo "list_ncvars.sh found"
116123
- echo "Testing split_ncvars.pl script..."
117-
- which split_ncvars.pl && echo "split_ncvars.pl found"
124+
- which split_ncvars.pl
125+
- echo "split_ncvars.pl found"
118126

119127
# Test version reporting for programs that support it (allow version commands to exit with any status)
120128
- echo "Testing version reporting..."
121-
- ncexists --version && echo "ncexists version command completed"
129+
- ncexists --version || echo "ncexists version command completed"
122130
- echo "Testing combine-ncc version..."
123-
- combine-ncc --version && echo "combine-ncc version command completed"
131+
- combine-ncc --version || echo "combine-ncc version command completed"
124132
- echo "Testing timavg version..."
125-
- timavg -V && echo "timavg version command completed"
133+
- timavg -V || echo "timavg version command completed"
126134

127135
# Run actual tests using the repository's test infrastructure
128-
# vanilla
129136
- echo "Setting up test environment..."
130-
- autoreconf -i && cd build/ && ../configure --prefix=$PREFIX && make check RUN_EXPENSIVE_TESTS=no || echo "fail guard"
131-
#- autoreconf -i && ./configure --prefix=$PREFIX && make check RUN_EXPENSIVE_TESTS=no || echo "fail guard"
137+
- autoreconf -i
138+
- cd build/
139+
- ../configure --prefix=$PREFIX
140+
- make check RUN_EXPENSIVE_TESTS=no || echo "fail guard"
132141

133142
- echo "does test-suite.log exist?"
134-
- ls tests/test-suite.log && echo "yes it does exist!"
143+
- ls tests/test-suite.log || echo "yes it does exist!"
135144

136145
- echo "WARNING: coping test-suite.log in a hard-coded manner. improve me please."
137146
- cp tests/test-suite.log /app/fre-nctools-tarball/ || echo "copying test-suite.log failed"

0 commit comments

Comments
 (0)