phoronix-test-suite / test-profiles

A read-only Git copy of the OpenBenchmarking.org test profiles.
Other
72 stars 83 forks source link

Install scripts don't fail if compilation fails #268

Open lucic71 opened 1 year ago

lucic71 commented 1 year ago

Some install.sh scripts are formed of two steps: first they compile the benchmark and then they run some decompressing. Take the example of git/aom-av1-1.1.0 (comments mine):

#!/bin/sh

## compilation step
rm -rf aom-master
git clone https://aomedia.googlesource.com/aom aom-master
mkdir aom-master/build
cd aom-master/build
cmake ..
make -j $NUM_CPU_CORES
echo $? > ~/install-exit-status
cd ~

## decompress step
7z x Bosphorus_1920x1080_120fps_420_8bit_YUV_Y4M.7z

echo "#!/bin/sh
./aom-master/build/aomenc -v --rt --threads=\$NUM_CPU_CORES --tile-columns=2 --limit=20 -o test.av1 Bosphorus_1920x1080_120fps_420_8bit_YUV.y4m > 1.log 2>&1
echo \$? > ~/test-exit-status
sed \$'s/[^[:print:]\t]/\\n/g' 1.log > \$LOG_FILE" > aom-av1
chmod +x aom-av1

However the script does not fail when the compilation fails and it will run the decompressing for no good reason, wasting time and CPU cycles.

What's my use case? I'm trying to see if some test profiles respect the CC/CXX variables set in the environment before calling something as:

phoronix-test-suite debug-install

I set CC=CXX=/garbage and clearly the compilation step fails but then the decompressing stars and takes an annoying amount of time.