forked from bids-standard/bids-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
31 lines (25 loc) · 784 Bytes
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
rc = 0;
for i in $(ls -d */ | grep -v node_modules); do
echo "Validating dataset" $i
if [ -f ${i%%/}/.SKIP_VALIDATION ]; then
echo "Skipping validation for ${i%%/}"
continue
fi
# Set the VALIDATOR_ARGS environment variable to pass additional arguments to the
# validator.
CMD="bids-validator ${i%%/} $VALIDATOR_ARGS"
# Use default configuration unless overridden
if [ ! -f ${i%%/}/.bids-validator-config.json ]; then
CMD="$CMD -c $PWD/bidsconfig.json"
fi
# Ignore NIfTI headers except for synthetic dataset
if [ $i != "synthetic/" ]; then
CMD="$CMD --ignoreNiftiHeaders"
else
echo "Validating NIfTI headers for dataset" $i
fi
echo $CMD
$CMD || rc=$?
done
exit $rc;