From 6b2d833ef211ab235cd95c8ba259cae0f78d3577 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Wed, 31 Jul 2019 16:08:18 -0700 Subject: [PATCH] LP#1662297: avoid hardcoded install path in web client build tests As a result of this change, you must run configure and make before building the web client. Signed-off-by: Jeff Davis --- .gitignore | 2 ++ Open-ILS/src/Makefile.am | 14 ++++++++- .../src/eg2/{karma.conf.js => karma.conf.js.in} | 8 ++--- .../staff/test/{karma.conf.js => karma.conf.js.in} | 8 ++--- docs/installation/server_installation.adoc | 34 +++++++++++----------- 5 files changed, 40 insertions(+), 26 deletions(-) rename Open-ILS/src/eg2/{karma.conf.js => karma.conf.js.in} (87%) rename Open-ILS/web/js/ui/default/staff/test/{karma.conf.js => karma.conf.js.in} (91%) diff --git a/.gitignore b/.gitignore index 9ba89b7705..333730a4b7 100644 --- a/.gitignore +++ b/.gitignore @@ -338,6 +338,8 @@ Open-ILS/src/support-scripts/eg_db_config Open-ILS/examples/apache_24/eg_24.conf Open-ILS/examples/apache_24/eg_startup Open-ILS/examples/apache_24/eg_vhost_24.conf +Open-ILS/web/js/ui/default/staff/test/karma.conf.js +Open-ILS/src/eg2/karma.conf.js Open-ILS/src/c-apps/tests/.deps/ Open-ILS/xul/staff_client/external/libmar/config.h Open-ILS/xul/staff_client/external/libmar/config.h.in diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index 9420028df4..015542db1a 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -144,13 +144,18 @@ gen_docs = \ $(examples)/apache_24/eg_24.conf \ $(examples)/apache_24/eg_vhost_24.conf +# karma conf for web client build tests +gen_karma_conf = \ + @top_srcdir@/Open-ILS/web/js/ui/default/staff/test/karma.conf.js \ + @srcdir@/eg2/karma.conf.js + bin_SCRIPTS = $(core_scripts) $(gen_scripts) $(reporter_scripts) $(installautojs) CLEANFILES = $(gen_scripts) data_DATA = $(core_data) $(reporter_data) -doc_DATA = $(gen_docs) +doc_DATA = $(gen_docs) $(gen_karma_conf) # Take care of which subdirectories to build, and which extra files to include in a distribution. @@ -163,6 +168,7 @@ EXTRA_DIST = @srcdir@/perlmods \ @srcdir@/cgi-bin \ $(gen_scripts) \ $(gen_docs) \ + $(gen_karma_conf) \ @srcdir@/extras/eg_config do_subst = $(SED) \ @@ -248,6 +254,12 @@ $(examples)/apache_24/eg_24.conf: Makefile $(examples)/apache_24/eg.conf.in $(examples)/apache_24/eg_vhost_24.conf: Makefile $(examples)/apache_24/eg_vhost.conf.in $(do_subst) $(examples)/apache_24/eg_vhost.conf.in > "$@" +@top_srcdir@/Open-ILS/web/js/ui/default/staff/test/karma.conf.js: Makefile @top_srcdir@/Open-ILS/web/js/ui/default/staff/test/karma.conf.js.in + $(do_subst) @top_srcdir@/Open-ILS/web/js/ui/default/staff/test/karma.conf.js.in > "$@" + +@srcdir@/eg2/karma.conf.js: Makefile @srcdir@/eg2/karma.conf.js.in + $(do_subst) @srcdir@/eg2/karma.conf.js.in > "$@" + #perl-install and string-templates-install ilscore-install: @echo $@ diff --git a/Open-ILS/src/eg2/karma.conf.js b/Open-ILS/src/eg2/karma.conf.js.in similarity index 87% rename from Open-ILS/src/eg2/karma.conf.js rename to Open-ILS/src/eg2/karma.conf.js.in index 63982de94b..eba7ee80ef 100644 --- a/Open-ILS/src/eg2/karma.conf.js +++ b/Open-ILS/src/eg2/karma.conf.js.in @@ -31,10 +31,10 @@ module.exports = function (config) { browsers: ['PhantomJS'], singleRun: true, files: [ - '/openils/lib/javascript/md5.js', - '/openils/lib/javascript/JSON_v1.js', - '/openils/lib/javascript/opensrf.js', - '/openils/lib/javascript/opensrf_ws.js', + '@libdir@/javascript/md5.js', + '@libdir@/javascript/JSON_v1.js', + '@libdir@/javascript/opensrf.js', + '@libdir@/javascript/opensrf_ws.js', // mock data for testing only 'src/test_data/IDL2js.js', 'src/test_data/eg_mock.js', diff --git a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js.in similarity index 91% rename from Open-ILS/web/js/ui/default/staff/test/karma.conf.js rename to Open-ILS/web/js/ui/default/staff/test/karma.conf.js.in index 987d216602..e57c8f01b3 100644 --- a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js +++ b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js.in @@ -13,10 +13,10 @@ module.exports = function(config){ 'node_modules/ng-toast/dist/ngToast.min.js', 'node_modules/angular-sanitize/angular-sanitize.min.js', /* OpenSRF must be installed first */ - '/openils/lib/javascript/md5.js', - '/openils/lib/javascript/JSON_v1.js', - '/openils/lib/javascript/opensrf.js', - '/openils/lib/javascript/opensrf_ws.js', + '@libdir@/javascript/md5.js', + '@libdir@/javascript/JSON_v1.js', + '@libdir@/javascript/opensrf.js', + '@libdir@/javascript/opensrf_ws.js', // mock data for testing only 'test/data/IDL2js.js', diff --git a/docs/installation/server_installation.adoc b/docs/installation/server_installation.adoc index d9443a3242..59a58b634d 100644 --- a/docs/installation/server_installation.adoc +++ b/docs/installation/server_installation.adoc @@ -115,6 +115,23 @@ make -f Open-ILS/src/extras/Makefile.install -translator make -f Open-ILS/src/extras/Makefile.install -packager ------------------------------------------------------------------------------ +Configuration and compilation instructions +------------------------------------------ + +For the time being, we are still installing everything in the `/openils/` +directory. From the Evergreen source directory, issue the following commands as +the *user* Linux account to configure and build Evergreen: + +[source, bash] +------------------------------------------------------------------------------ +PATH=/openils/bin:$PATH ./configure --prefix=/openils --sysconfdir=/openils/conf +make +------------------------------------------------------------------------------ + +These instructions assume that you have also installed OpenSRF under `/openils/`. +If not, please adjust PATH as needed so that the Evergreen `configure` script +can find `osrf_config`. + Extra steps for web staff client -------------------------------- @@ -192,23 +209,6 @@ ng build --prod npm run test ------------------------------------------------------------------------------ -Configuration and compilation instructions ------------------------------------------- - -For the time being, we are still installing everything in the `/openils/` -directory. From the Evergreen source directory, issue the following commands as -the *user* Linux account to configure and build Evergreen: - -[source, bash] ------------------------------------------------------------------------------- -PATH=/openils/bin:$PATH ./configure --prefix=/openils --sysconfdir=/openils/conf -make ------------------------------------------------------------------------------- - -These instructions assume that you have also installed OpenSRF under `/openils/`. -If not, please adjust PATH as needed so that the Evergreen `configure` script -can find `osrf_config`. - Installation instructions ------------------------- -- 2.11.0