Move CHROME_BIN envvar inside TEST_COMMAND
authorJason Boyer <JBoyer@equinoxinitiative.org>
Mon, 11 Nov 2019 13:10:54 +0000 (08:10 -0500)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Mon, 11 Nov 2019 13:10:54 +0000 (08:10 -0500)
karma-chrome-launcher needs to be told where to find Chromium
if that's installed rather than Chrome. And because the tests
are run with 'su - ' that env variable definition has to be
put inside both TEST_COMMAND definitions.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
installer/stretch/eg_stretch_installer.sh

index 43aae46..578ab64 100755 (executable)
@@ -288,9 +288,6 @@ function init_variables {
     echo "NODEJS_BINARY=$NODEJS_BINARY"
     echo "NODEJS_VERSION=$NODEJS_VERSION"
 
-    # to fix hopefully fix an npm ELIFECYCLE error
-    export CHROME_BIN=/usr/bin/chromium
-
     echo End of intializing installer =~-._
 }
 
@@ -669,6 +666,7 @@ function eg_angularjs_web_build {
     date
     TEST_COMMAND='
         cd /home/test/Evergreen/Open-ILS/web/js/ui/default/staff/ ;
+        export CHROME_BIN=/usr/bin/chromium
         echo Running npm install: ;
         npm install ;
         echo Return Value = $? ;
@@ -689,6 +687,7 @@ function eg_angular_web_build {
     date
     TEST_COMMAND='
         cd /home/test/Evergreen/Open-ILS/src/eg2/ ;
+        export CHROME_BIN=/usr/bin/chromium
         echo Running npm install: ;
         npm install ;
         echo Return Value = $? ;