hark130 / sketchy-idea

Reusable, stand-alone, Linux code
GNU General Public License v3.0
0 stars 0 forks source link

sketchy-idea

Reusable, stand-alone, Linux code.

SKETCHY IDEA (SKID)

My opportunity to write some clean Linux code that is tested and releasable.

DEPENDENCIES

USAGE

Do Everything Everywhere All At Once

make

Is everything installed properly?

make validate

Are all the Check unit tests really passing?

The for loop below will execute all the check_*.bin files and then execute them again with Valgrind. The for loop will stop if any failure is encountered: Check, Valgrind, or otherwise.

make && \
for check_bin in $(ls code/dist/check_*.bin); do $check_bin; [[ $? -ne 0 ]] && break || CK_FORK=no valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 $check_bin; [[ $? -ne 0 ]] && break || continue; done

How many Check unit tests are there?

for check_bin in $(ls code/dist/check_*.bin); do $check_bin; [[ $? -ne 0 ]] && break; done | grep "100%: Checks: " | awk '{sum += $3} END {print "TOTAL CHECK UNIT TESTS: "sum}'

NOTES

Save the output

"Export" shell scripts can be found in ./devops/scripts/*.sh Example:

./devops/scripts/13-2_export.sh > ./devops/files/13-2_output.txt 2>&1
./devops/scripts/13-4_export.sh > ./devops/files/13-4_output.txt 2>&1

Check unit test framework