2018-11-20 23:02:06 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-01-27 23:10:34 +01:00
|
|
|
source test/scripts/jenkins_test_setup_oss.sh
|
2020-01-08 21:08:48 +01:00
|
|
|
|
2020-01-27 23:10:34 +01:00
|
|
|
if [[ -z "$CODE_COVERAGE" ]]; then
|
2020-01-08 21:08:48 +01:00
|
|
|
checks-reporter-with-killswitch "Functional tests / Group ${CI_GROUP}" yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}";
|
|
|
|
|
2020-07-08 22:05:12 +02:00
|
|
|
if [ "$CI_GROUP" == "1" ]; then
|
2020-04-01 16:11:33 +02:00
|
|
|
source test/scripts/jenkins_build_kbn_sample_panel_action.sh
|
2020-01-08 21:08:48 +01:00
|
|
|
yarn run grunt run:pluginFunctionalTestsRelease --from=source;
|
|
|
|
yarn run grunt run:exampleFunctionalTestsRelease --from=source;
|
|
|
|
yarn run grunt run:interpreterFunctionalTestsRelease;
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo " -> Running Functional tests with code coverage"
|
|
|
|
export NODE_OPTIONS=--max_old_space_size=8192
|
2020-01-29 14:36:47 +01:00
|
|
|
|
|
|
|
echo " -> making hard link clones"
|
|
|
|
cd ..
|
|
|
|
cp -RlP kibana "kibana${CI_GROUP}"
|
|
|
|
cd "kibana${CI_GROUP}"
|
|
|
|
|
|
|
|
echo " -> running tests from the clone folder"
|
2020-03-03 18:05:13 +01:00
|
|
|
#yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}";
|
2020-04-16 19:40:55 +02:00
|
|
|
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP" --exclude-tag "skipCoverage" || true;
|
2020-01-29 14:36:47 +01:00
|
|
|
|
|
|
|
if [[ -d target/kibana-coverage/functional ]]; then
|
|
|
|
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
|
|
|
|
sed -i "s|kibana${CI_GROUP}|kibana|g" target/kibana-coverage/functional/*.json
|
|
|
|
echo " -> copying coverage to the original folder"
|
|
|
|
mkdir -p ../kibana/target/kibana-coverage/functional
|
2020-03-03 18:05:13 +01:00
|
|
|
mv target/kibana-coverage/functional/* ../kibana/target/kibana-coverage/functional/
|
2020-01-29 14:36:47 +01:00
|
|
|
fi
|
2020-06-05 17:34:25 +02:00
|
|
|
|
|
|
|
echo " -> moving junit output, silently fail in case of no report"
|
|
|
|
mkdir -p ../kibana/target/junit
|
|
|
|
mv target/junit/* ../kibana/target/junit/ || echo "copying junit failed"
|
|
|
|
|
|
|
|
echo " -> copying screenshots and html for failures"
|
|
|
|
cp -r test/functional/screenshots/* ../kibana/test/functional/screenshots/ || echo "copying screenshots failed"
|
|
|
|
cp -r test/functional/failure_debug ../kibana/test/functional/ || echo "copying html failed"
|
2020-05-13 23:09:42 +02:00
|
|
|
fi
|