From 5d32ce83ccc2b47928cb6c7cb0ac21a57a200056 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 4 Jan 2024 19:11:58 +0530 Subject: [PATCH 01/30] tests --- bin/ci/self-test/script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 342deb585..d94d98309 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -54,6 +54,8 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & CHROMEDRIVER_PID=$! + eval "yarn test:nightwatch --help" + eval "yarn test:nightwatch \\ --headless \\ --passWithNoTests \\ From e900d0d6c748000e3e8ffe082978b200e711222b Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 4 Jan 2024 19:24:46 +0530 Subject: [PATCH 02/30] tests --- bin/ci/self-test/script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index d94d98309..923713801 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -59,10 +59,12 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && eval "yarn test:nightwatch \\ --headless \\ --passWithNoTests \\ + --verbose \\ --tag=$ORCA_SUT_MACHINE_NAME" eval "yarn test:nightwatch \\ --headless \\ + --verbose \\ --passWithNoTests \\ --tag=core" From 8b968d796fa64c788e16d070238fed9f10dfd218 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 4 Jan 2024 19:37:23 +0530 Subject: [PATCH 03/30] tests --- bin/ci/_includes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index e939bb215..07978ff3f 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -70,7 +70,7 @@ export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY="../" export DRUPAL_TEST_BASE_URL="http://localhost:8080" export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" -export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox" +export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ From 719e52521ec46df4934de8ddbca9383f5451d813 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 4 Jan 2024 19:47:11 +0530 Subject: [PATCH 04/30] tests --- bin/ci/self-test/script.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 923713801..99be04843 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -54,7 +54,6 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & CHROMEDRIVER_PID=$! - eval "yarn test:nightwatch --help" eval "yarn test:nightwatch \\ --headless \\ @@ -64,7 +63,6 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && eval "yarn test:nightwatch \\ --headless \\ - --verbose \\ --passWithNoTests \\ --tag=core" From 7d59a687843c0484c0facd6017e12eb13b69b5d8 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 4 Jan 2024 19:52:50 +0530 Subject: [PATCH 05/30] tests --- bin/ci/self-test/script.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 99be04843..2cc91a750 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -58,7 +58,6 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && eval "yarn test:nightwatch \\ --headless \\ --passWithNoTests \\ - --verbose \\ --tag=$ORCA_SUT_MACHINE_NAME" eval "yarn test:nightwatch \\ From f406ed2dd133e340be14823289f4c57961460255 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Fri, 5 Jan 2024 23:54:12 +0530 Subject: [PATCH 06/30] tests --- bin/ci/_includes.sh | 4 ++-- bin/ci/script.sh | 2 +- bin/ci/self-test/script.sh | 2 +- src/Domain/Server/ChromeDriverServer.php | 2 +- src/Domain/Tool/Phpunit/PhpUnitTask.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index 07978ff3f..cee4dfe07 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -70,9 +70,9 @@ export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY="../" export DRUPAL_TEST_BASE_URL="http://localhost:8080" export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" -export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" +export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" -export DRUPAL_TEST_WEBDRIVER_PORT="4444" +export DRUPAL_TEST_WEBDRIVER_PORT="9515" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ if [[ ! "$ORCA_TEMP_DIR" ]]; then diff --git a/bin/ci/script.sh b/bin/ci/script.sh index 3225e8d20..2af67121e 100755 --- a/bin/ci/script.sh +++ b/bin/ci/script.sh @@ -18,7 +18,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=9515 & CHROMEDRIVER_PID=$! eval "yarn test:nightwatch \\ diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 2cc91a750..64aa04e61 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -51,7 +51,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=9515 & CHROMEDRIVER_PID=$! diff --git a/src/Domain/Server/ChromeDriverServer.php b/src/Domain/Server/ChromeDriverServer.php index 65e38f448..57593e4eb 100644 --- a/src/Domain/Server/ChromeDriverServer.php +++ b/src/Domain/Server/ChromeDriverServer.php @@ -45,7 +45,7 @@ protected function createProcess(): Process { '--disable-gpu', '--headless', '--no-sandbox', - '--port=4444', + '--port=9515', ]; return new Process($command); } diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index ef9099c5c..2c106bd1e 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -308,7 +308,7 @@ private function getMinkWebDriverArguments(): string { ], ], ], - 'http://localhost:4444', + 'http://localhost:9515', ], JSON_UNESCAPED_SLASHES); } From 7ff6a54d1548b98fb8f0d0923c259eed70d7a59e Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 15:01:40 +0530 Subject: [PATCH 07/30] go to 4444 --- bin/ci/_includes.sh | 2 +- bin/ci/script.sh | 2 +- bin/ci/self-test/script.sh | 2 +- src/Domain/Server/ChromeDriverServer.php | 2 +- src/Domain/Tool/Phpunit/PhpUnitTask.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index cee4dfe07..e939bb215 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -72,7 +72,7 @@ export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" -export DRUPAL_TEST_WEBDRIVER_PORT="9515" +export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ if [[ ! "$ORCA_TEMP_DIR" ]]; then diff --git a/bin/ci/script.sh b/bin/ci/script.sh index 2af67121e..3225e8d20 100755 --- a/bin/ci/script.sh +++ b/bin/ci/script.sh @@ -18,7 +18,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=9515 & + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & CHROMEDRIVER_PID=$! eval "yarn test:nightwatch \\ diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 64aa04e61..2cc91a750 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -51,7 +51,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=9515 & + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & CHROMEDRIVER_PID=$! diff --git a/src/Domain/Server/ChromeDriverServer.php b/src/Domain/Server/ChromeDriverServer.php index 57593e4eb..65e38f448 100644 --- a/src/Domain/Server/ChromeDriverServer.php +++ b/src/Domain/Server/ChromeDriverServer.php @@ -45,7 +45,7 @@ protected function createProcess(): Process { '--disable-gpu', '--headless', '--no-sandbox', - '--port=9515', + '--port=4444', ]; return new Process($command); } diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index 2c106bd1e..ef9099c5c 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -308,7 +308,7 @@ private function getMinkWebDriverArguments(): string { ], ], ], - 'http://localhost:9515', + 'http://localhost:4444', ], JSON_UNESCAPED_SLASHES); } From 73dbf861d550a2fd2f102d3a53227f60307267f4 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 15:02:50 +0530 Subject: [PATCH 08/30] remove core nightwatch --- bin/ci/self-test/script.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 2cc91a750..72a0c2af9 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -60,10 +60,10 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --passWithNoTests \\ --tag=$ORCA_SUT_MACHINE_NAME" - eval "yarn test:nightwatch \\ - --headless \\ - --passWithNoTests \\ - --tag=core" +# eval "yarn test:nightwatch \\ +# --headless \\ +# --passWithNoTests \\ +# --tag=core" kill -0 $SERVER_PID kill -0 $CHROMEDRIVER_PID From 2e7373f55166fc35dd6e23989c6318c17dc18fa2 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 15:59:28 +0530 Subject: [PATCH 09/30] enable core tests and disable shm --- bin/ci/_includes.sh | 2 +- bin/ci/self-test/script.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index e939bb215..07978ff3f 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -70,7 +70,7 @@ export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY="../" export DRUPAL_TEST_BASE_URL="http://localhost:8080" export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" -export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox" +export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 72a0c2af9..2cc91a750 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -60,10 +60,10 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --passWithNoTests \\ --tag=$ORCA_SUT_MACHINE_NAME" -# eval "yarn test:nightwatch \\ -# --headless \\ -# --passWithNoTests \\ -# --tag=core" + eval "yarn test:nightwatch \\ + --headless \\ + --passWithNoTests \\ + --tag=core" kill -0 $SERVER_PID kill -0 $CHROMEDRIVER_PID From a3a9bf7f3ded48267de1da7b331689856f5bf1d8 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 16:07:39 +0530 Subject: [PATCH 10/30] remove core tests --- bin/ci/self-test/script.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 2cc91a750..72a0c2af9 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -60,10 +60,10 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --passWithNoTests \\ --tag=$ORCA_SUT_MACHINE_NAME" - eval "yarn test:nightwatch \\ - --headless \\ - --passWithNoTests \\ - --tag=core" +# eval "yarn test:nightwatch \\ +# --headless \\ +# --passWithNoTests \\ +# --tag=core" kill -0 $SERVER_PID kill -0 $CHROMEDRIVER_PID From 2461ec46da089a041d8f6da66e09b9318fe6fb83 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 17:16:38 +0530 Subject: [PATCH 11/30] change port --- bin/ci/_includes.sh | 2 +- bin/ci/self-test/script.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index 07978ff3f..d4e3f5bb2 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -72,7 +72,7 @@ export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" -export DRUPAL_TEST_WEBDRIVER_PORT="4444" +export DRUPAL_TEST_WEBDRIVER_PORT="9515" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ if [[ ! "$ORCA_TEMP_DIR" ]]; then diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 72a0c2af9..2cc91a750 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -60,10 +60,10 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --passWithNoTests \\ --tag=$ORCA_SUT_MACHINE_NAME" -# eval "yarn test:nightwatch \\ -# --headless \\ -# --passWithNoTests \\ -# --tag=core" + eval "yarn test:nightwatch \\ + --headless \\ + --passWithNoTests \\ + --tag=core" kill -0 $SERVER_PID kill -0 $CHROMEDRIVER_PID From da51627793fe145789c388db5695f3c6e9731651 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 17:17:43 +0530 Subject: [PATCH 12/30] remoce chromedriver --- bin/ci/self-test/script.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 2cc91a750..a9a7c183c 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -50,9 +50,9 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && orca fixture:run-server & SERVER_PID=$! - # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & - CHROMEDRIVER_PID=$! +# # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? +# chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & +# CHROMEDRIVER_PID=$! eval "yarn test:nightwatch \\ @@ -66,6 +66,6 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --tag=core" kill -0 $SERVER_PID - kill -0 $CHROMEDRIVER_PID +# kill -0 $CHROMEDRIVER_PID ) fi From ac2dcd43782c307a6c67565b1bb6b49c148a98f6 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 17:47:57 +0530 Subject: [PATCH 13/30] use port 9515 for gitlab --- bin/ci/_includes.sh | 2 +- bin/ci/self-test/script.sh | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index d4e3f5bb2..07978ff3f 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -72,7 +72,7 @@ export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" -export DRUPAL_TEST_WEBDRIVER_PORT="9515" +export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ if [[ ! "$ORCA_TEMP_DIR" ]]; then diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index a9a7c183c..177e477ad 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -50,9 +50,14 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && orca fixture:run-server & SERVER_PID=$! -# # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? -# chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & -# CHROMEDRIVER_PID=$! + if [[ "$GITLAB_CI" ]]; then + export DRUPAL_TEST_WEBDRIVER_PORT="9515" + fi + else + # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & + CHROMEDRIVER_PID=$! + fi eval "yarn test:nightwatch \\ @@ -66,6 +71,8 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && --tag=core" kill -0 $SERVER_PID -# kill -0 $CHROMEDRIVER_PID + if [ $CHROMEDRIVER_PID ]; then + kill -0 $CHROMEDRIVER_PID + fi ) fi From cc314c965f62990d3d815072fedd6be752aac982 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 17:50:16 +0530 Subject: [PATCH 14/30] minor fix --- bin/ci/self-test/script.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 177e477ad..fd302735b 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -52,7 +52,6 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && if [[ "$GITLAB_CI" ]]; then export DRUPAL_TEST_WEBDRIVER_PORT="9515" - fi else # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & From 6105da69324dc51fbd80b68e314d767baed458c4 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 18:37:52 +0530 Subject: [PATCH 15/30] Ignore toolbar from nightwatch --- bin/ci/_includes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index 07978ff3f..a7d1ea26d 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -64,7 +64,7 @@ export ORCA_SUT_MACHINE_NAME=${ORCA_SUT_NAME##*\/} export ORCA_TELEMETRY_ENABLE=${ORCA_TELEMETRY_ENABLE:="FALSE"} export ORCA_ENABLE_NIGHTWATCH=${ORCA_ENABLE_NIGHTWATCH:="FALSE"} export ORCA_YARN_DIR="${ORCA_FIXTURE_DIR}/docroot/core" -export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest" +export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" export DRUPAL_NIGHTWATCH_OUTPUT="sites/default/reports/nightwatch" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY="../" export DRUPAL_TEST_BASE_URL="http://localhost:8080" From 1c5cfebfe50d3a57ca9a1d32f5e3f5fcbc949dad Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 19:40:10 +0530 Subject: [PATCH 16/30] cleanup --- bin/ci/_includes.sh | 4 ++-- bin/ci/before_install.sh | 5 +++++ bin/ci/self-test/script.sh | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index a7d1ea26d..e939bb215 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -64,13 +64,13 @@ export ORCA_SUT_MACHINE_NAME=${ORCA_SUT_NAME##*\/} export ORCA_TELEMETRY_ENABLE=${ORCA_TELEMETRY_ENABLE:="FALSE"} export ORCA_ENABLE_NIGHTWATCH=${ORCA_ENABLE_NIGHTWATCH:="FALSE"} export ORCA_YARN_DIR="${ORCA_FIXTURE_DIR}/docroot/core" -export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" +export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest" export DRUPAL_NIGHTWATCH_OUTPUT="sites/default/reports/nightwatch" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY="../" export DRUPAL_TEST_BASE_URL="http://localhost:8080" export DRUPAL_TEST_CHROMEDRIVER_AUTOSTART="false" export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite" -export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" +export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox" export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index 4d2544be9..458093c0f 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -79,6 +79,11 @@ if [[ "$JENKINS_HOME" ]]; then fi +if [[ "$GITLAB_CI" ]]; then + export DRUPAL_TEST_WEBDRIVER_PORT="9515" + export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" + export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" +fi diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index fd302735b..a1b24de5d 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -51,7 +51,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! if [[ "$GITLAB_CI" ]]; then - export DRUPAL_TEST_WEBDRIVER_PORT="9515" + echo "Chromedriver initialised via separate container..." else # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & From 5b4f0a3649761d4ae4c2b2580199cdac73b2110f Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 19:51:37 +0530 Subject: [PATCH 17/30] comments --- bin/ci/before_install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index 458093c0f..2eab2a927 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -80,8 +80,11 @@ fi if [[ "$GITLAB_CI" ]]; then + # In Gitlab we are using a separate container to run chromedriver on port 9515. export DRUPAL_TEST_WEBDRIVER_PORT="9515" + # Nightwatch tests are crashing when they run on shm due to size constraint, hence disabling. export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" + # We are facing intermittent failures for Nightwatch tests of toolbar module, hence ignoring. export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" fi From efde42ef04bd8133deb1361268460c49ae58906d Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 19:55:54 +0530 Subject: [PATCH 18/30] comments --- bin/ci/_includes.sh | 9 +++++++++ bin/ci/before_install.sh | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index e939bb215..684786267 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -75,6 +75,15 @@ export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost" export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ +if [[ "$GITLAB_CI" ]]; then + # In Gitlab we are using a separate container to run chromedriver on port 9515. + export DRUPAL_TEST_WEBDRIVER_PORT="9515" + # Nightwatch tests are crashing when they run on shm due to size constraint, hence disabling. + export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" + # We are facing intermittent failures for Nightwatch tests of toolbar module, hence ignoring. + export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" +fi + if [[ ! "$ORCA_TEMP_DIR" ]]; then # GitHub Actions. if [[ "$RUNNER_TEMP" ]]; then diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index 2eab2a927..a2999c40e 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -79,16 +79,6 @@ if [[ "$JENKINS_HOME" ]]; then fi -if [[ "$GITLAB_CI" ]]; then - # In Gitlab we are using a separate container to run chromedriver on port 9515. - export DRUPAL_TEST_WEBDRIVER_PORT="9515" - # Nightwatch tests are crashing when they run on shm due to size constraint, hence disabling. - export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" - # We are facing intermittent failures for Nightwatch tests of toolbar module, hence ignoring. - export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" -fi - - # Display PHP information. From ab0e9b455b07fdca7778500dd60ede6e0a5be85d Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Tue, 9 Jan 2024 19:57:02 +0530 Subject: [PATCH 19/30] comments --- bin/ci/before_install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index a2999c40e..4d2544be9 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -81,6 +81,8 @@ fi + + # Display PHP information. which php php -i From 56134a79c6e3f6ca34d68f5a88573583d2023df0 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Wed, 17 Jan 2024 14:38:43 +0530 Subject: [PATCH 20/30] Gitlab CI --- bin/ci/before_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index 4d2544be9..4ce185665 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -34,7 +34,7 @@ if [[ ! "$ORCA_COVERAGE_ENABLE" == TRUE ]]; then fi fi -if [[ "$JENKINS_HOME" ]]; then +if [[ "$JENKINS_HOME" || "$GITLAB_CI" ]]; then LINUX_VERSION_STRING="$( cat /etc/os-release )" echo "$LINUX_VERSION_STRING" if echo "$LINUX_VERSION_STRING" | grep -q "alpine" From f80234f34f5d1a9fabd20139839f863ded87cd8b Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Wed, 17 Jan 2024 22:42:34 +0530 Subject: [PATCH 21/30] add junit log for all phpunit tests --- src/Domain/Tool/Phpunit/PhpUnitTask.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index ef9099c5c..6372169ee 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -325,7 +325,7 @@ protected function runPhpUnit(): void { ]; if ($this->shouldGenerateCodeCoverage()) { $command[] = "--coverage-clover={$this->cloverCoverage}"; - $command[] = "--log-junit={$this->junitLog}"; + // $command[] = "--log-junit={$this->junitLog}"; $this->processRunner->addEnvVar("XDEBUG_MODE", "coverage"); } $command = array_merge($command, [ @@ -334,6 +334,7 @@ protected function runPhpUnit(): void { "--configuration={$this->fixture->getPath('docroot/core/phpunit.xml')}", '--exclude-group=orca_ignore', '--testsuite=orca', + "--log-junit={$this->junitLog}", ]); if ($this->isPublicTestsOnly()) { $command[] = '--group=orca_public'; From d1a5fc61b68d1969d09a1563f7aa02b5b79cfee7 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 00:11:11 +0530 Subject: [PATCH 22/30] minor changes --- bin/ci/script.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/ci/script.sh b/bin/ci/script.sh index 3225e8d20..a25ed5625 100755 --- a/bin/ci/script.sh +++ b/bin/ci/script.sh @@ -17,9 +17,13 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && orca fixture:run-server & SERVER_PID=$! - # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? - chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & - CHROMEDRIVER_PID=$! + if [[ "$GITLAB_CI" ]]; then + echo "Chromedriver initialised via separate container..." + else + # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? + chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & + CHROMEDRIVER_PID=$! + fi eval "yarn test:nightwatch \\ --headless \\ From e9f33ae0759d9ce020794ef6daf420709287c2b0 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 01:04:08 +0530 Subject: [PATCH 23/30] minor changes 2 --- bin/ci/_includes.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index 684786267..74c2a1367 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -82,6 +82,8 @@ if [[ "$GITLAB_CI" ]]; then export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" # We are facing intermittent failures for Nightwatch tests of toolbar module, hence ignoring. export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" + # Set DRUPAL_NIGHTWATCH_OUTPUT to a path inside project dir. + export DRUPAL_NIGHTWATCH_OUTPUT="$CI_PROJECT_DIR/reports/nightwatch" fi if [[ ! "$ORCA_TEMP_DIR" ]]; then From 442f2d95e033fb56145017d888c125868401775b Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 13:58:25 +0530 Subject: [PATCH 24/30] Cleanup --- src/Domain/Tool/Phpunit/PhpUnitTask.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index 6372169ee..28ea5af44 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -325,7 +325,6 @@ protected function runPhpUnit(): void { ]; if ($this->shouldGenerateCodeCoverage()) { $command[] = "--coverage-clover={$this->cloverCoverage}"; - // $command[] = "--log-junit={$this->junitLog}"; $this->processRunner->addEnvVar("XDEBUG_MODE", "coverage"); } $command = array_merge($command, [ From 84dc0e1a3b96b91af47635d1537585971815785c Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 21:13:47 +0530 Subject: [PATCH 25/30] change port for gitlab ci --- src/Domain/Server/ChromeDriverServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Domain/Server/ChromeDriverServer.php b/src/Domain/Server/ChromeDriverServer.php index 65e38f448..57593e4eb 100644 --- a/src/Domain/Server/ChromeDriverServer.php +++ b/src/Domain/Server/ChromeDriverServer.php @@ -45,7 +45,7 @@ protected function createProcess(): Process { '--disable-gpu', '--headless', '--no-sandbox', - '--port=4444', + '--port=9515', ]; return new Process($command); } From 714f3cda3936133967397717d8d7ed103d43c769 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 21:25:41 +0530 Subject: [PATCH 26/30] remove chromedriver --- bin/ci/before_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ci/before_install.sh b/bin/ci/before_install.sh index 4ce185665..4d2544be9 100755 --- a/bin/ci/before_install.sh +++ b/bin/ci/before_install.sh @@ -34,7 +34,7 @@ if [[ ! "$ORCA_COVERAGE_ENABLE" == TRUE ]]; then fi fi -if [[ "$JENKINS_HOME" || "$GITLAB_CI" ]]; then +if [[ "$JENKINS_HOME" ]]; then LINUX_VERSION_STRING="$( cat /etc/os-release )" echo "$LINUX_VERSION_STRING" if echo "$LINUX_VERSION_STRING" | grep -q "alpine" From b68306e242f76977bccbf7175be9a21e3978bdb5 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 23:09:48 +0530 Subject: [PATCH 27/30] change port --- src/Domain/Tool/Phpunit/PhpUnitTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index 28ea5af44..30a1ef84f 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -308,7 +308,7 @@ private function getMinkWebDriverArguments(): string { ], ], ], - 'http://localhost:4444', + 'http://chrome:9515', ], JSON_UNESCAPED_SLASHES); } From b9d767b6df572b7340c5f5717c4892419fb666f8 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Thu, 18 Jan 2024 23:25:21 +0530 Subject: [PATCH 28/30] change port 2 --- src/Domain/Tool/Phpunit/PhpUnitTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index 30a1ef84f..5185b9845 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -308,7 +308,7 @@ private function getMinkWebDriverArguments(): string { ], ], ], - 'http://chrome:9515', + 'http://localhost:9515', ], JSON_UNESCAPED_SLASHES); } From 9e2000fffb169e5c149fedbe20ce32bf4fb48fc6 Mon Sep 17 00:00:00 2001 From: sayan goswami Date: Fri, 19 Jan 2024 14:11:50 +0530 Subject: [PATCH 29/30] Add cobertura format instead of clover --- bin/ci/self-test/script.sh | 2 +- src/Domain/Tool/Phpunit/PhpUnitTask.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index a1b24de5d..96e7a7b43 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -34,7 +34,7 @@ if [[ "$ORCA_JOB" == "STATIC_CODE_ANALYSIS" ]]; then echo if [[ "$ORCA_COVERAGE_ENABLE" == TRUE ]]; then - eval './vendor/bin/phpunit --coverage-clover="$ORCA_SELF_TEST_COVERAGE_CLOVER"' + eval './vendor/bin/phpunit --coverage-cobertura="$ORCA_SELF_TEST_COVERAGE_CLOVER"' else eval './vendor/bin/phpunit' fi diff --git a/src/Domain/Tool/Phpunit/PhpUnitTask.php b/src/Domain/Tool/Phpunit/PhpUnitTask.php index 5185b9845..c60bd4dc9 100644 --- a/src/Domain/Tool/Phpunit/PhpUnitTask.php +++ b/src/Domain/Tool/Phpunit/PhpUnitTask.php @@ -324,7 +324,7 @@ protected function runPhpUnit(): void { '--verbose', ]; if ($this->shouldGenerateCodeCoverage()) { - $command[] = "--coverage-clover={$this->cloverCoverage}"; + $command[] = "--coverage-cobertura={$this->cloverCoverage}"; $this->processRunner->addEnvVar("XDEBUG_MODE", "coverage"); } $command = array_merge($command, [ From 83d9276f7156656d448b570bb27a249c24248d74 Mon Sep 17 00:00:00 2001 From: Travis Carden Date: Fri, 19 Jan 2024 12:29:01 -0500 Subject: [PATCH 30/30] Apply suggestions from code review --- bin/ci/_includes.sh | 4 ++-- bin/ci/script.sh | 2 +- bin/ci/self-test/script.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/ci/_includes.sh b/bin/ci/_includes.sh index 74c2a1367..4c914cb0b 100755 --- a/bin/ci/_includes.sh +++ b/bin/ci/_includes.sh @@ -76,9 +76,9 @@ export DRUPAL_TEST_WEBDRIVER_PORT="4444" export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../ if [[ "$GITLAB_CI" ]]; then - # In Gitlab we are using a separate container to run chromedriver on port 9515. + # In Gitlab we are using a separate container to run ChromeDriver on port 9515. export DRUPAL_TEST_WEBDRIVER_PORT="9515" - # Nightwatch tests are crashing when they run on shm due to size constraint, hence disabling. + # Nightwatch tests are crashing when they run on SHM due to size constraint, hence disabling. export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-dev-shm-usage --disable-gpu --headless --no-sandbox" # We are facing intermittent failures for Nightwatch tests of toolbar module, hence ignoring. export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest,/builds/project/orca-build/docroot/core/modules/toolbar/tests/src/Nightwatch/Tests/*" diff --git a/bin/ci/script.sh b/bin/ci/script.sh index a25ed5625..8846d0e40 100755 --- a/bin/ci/script.sh +++ b/bin/ci/script.sh @@ -18,7 +18,7 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! if [[ "$GITLAB_CI" ]]; then - echo "Chromedriver initialised via separate container..." + echo "ChromeDriver initialized via separate container..." else # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & diff --git a/bin/ci/self-test/script.sh b/bin/ci/self-test/script.sh index 96e7a7b43..a58ebbfa3 100755 --- a/bin/ci/self-test/script.sh +++ b/bin/ci/self-test/script.sh @@ -51,9 +51,9 @@ if [[ "$ORCA_ENABLE_NIGHTWATCH" == "TRUE" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && SERVER_PID=$! if [[ "$GITLAB_CI" ]]; then - echo "Chromedriver initialised via separate container..." + echo "ChromeDriver initialized via separate container..." else - # @todo could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching Chromedriver manually? + # @todo Could we set DRUPAL_TEST_CHROMEDRIVER_AUTOSTART instead of launching ChromeDriver manually? chromedriver --disable-dev-shm-usage --disable-extensions --disable-gpu --headless --no-sandbox --port=4444 & CHROMEDRIVER_PID=$! fi