]> Kevux Git Server - fll/commitdiff
Bugfix: When any of -c, -p, or -s is the last parameter in test.sh no error is thrown.
authorKevin Day <thekevinday@gmail.com>
Mon, 6 Jun 2022 00:21:48 +0000 (19:21 -0500)
committerKevin Day <thekevinday@gmail.com>
Mon, 6 Jun 2022 00:21:48 +0000 (19:21 -0500)
These must have an error because they expect an additional argument.
Change the behavior of the code to cause an error in this cases.

I took the lazy way out and just set the variables to trigger an error rather than implementing a specific error handler for these cases.

build/scripts/test.sh

index 9b717997a9401f4c2c631980a7c6a128a13cdc62..3c6c84750bb705e958d476877d699dfa0b92efc8 100644 (file)
@@ -102,8 +102,10 @@ test_main() {
           build_project=yes
         elif [[ $p == "-s" || $p == "--path_scripts" ]] ; then
           grab_next=path_scripts
+          path_scripts=
         elif [[ $p == "-t" || $p == "--path_test" ]] ; then
           grab_next=path_test
+          path_test=
         elif [[ $test_system == "" ]] ; then
           test_system="$p"
         else
@@ -154,7 +156,7 @@ test_main() {
     test_system=normal
   fi
 
-  if [[ $build_compiler == "" ]] ; then
+  if [[ $grab_next != "build_compiler" && $build_compiler == "" ]] ; then
     build_compiler=gcc
   fi