mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Code coverage: run functional tests from repo copy (#55195)
* run functional tests from cloned folders * do not copy kibana.yml Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
1838d76af6
commit
25fb555a53
3 changed files with 34 additions and 11 deletions
|
@ -40,16 +40,11 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
|
|||
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
|
||||
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
|
||||
]),
|
||||
'kibana-xpack-agent-1': kibanaPipeline.withWorkers('kibana-xpack-tests-1', { kibanaPipeline.buildXpack() }, [
|
||||
'kibana-xpack-agent': kibanaPipeline.withWorkers('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
|
||||
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
|
||||
'xpack-ciGroup2': kibanaPipeline.getXpackCiGroupWorker(2),
|
||||
]),
|
||||
'kibana-xpack-agent-2': kibanaPipeline.withWorkers('kibana-xpack-tests-2', { kibanaPipeline.buildXpack() }, [
|
||||
'xpack-ciGroup3': kibanaPipeline.getXpackCiGroupWorker(3),
|
||||
'xpack-ciGroup4': kibanaPipeline.getXpackCiGroupWorker(4),
|
||||
]),
|
||||
|
||||
'kibana-xpack-agent-3': kibanaPipeline.withWorkers('kibana-xpack-tests-3', { kibanaPipeline.buildXpack() }, [
|
||||
'xpack-ciGroup5': kibanaPipeline.getXpackCiGroupWorker(5),
|
||||
'xpack-ciGroup6': kibanaPipeline.getXpackCiGroupWorker(6),
|
||||
'xpack-ciGroup7': kibanaPipeline.getXpackCiGroupWorker(7),
|
||||
|
@ -75,9 +70,7 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
|
|||
echo extracting kibana-oss-tests
|
||||
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
|
||||
echo extracting kibana-xpack-tests
|
||||
for i in {1..3}; do
|
||||
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests-${i}/kibana-coverage.tar.gz -C /tmp/extracted_coverage
|
||||
done
|
||||
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
|
||||
# replace path in json files to have valid html report
|
||||
pwd=$(pwd)
|
||||
du -sh /tmp/extracted_coverage/target/kibana-coverage/
|
||||
|
|
|
@ -14,5 +14,20 @@ if [[ -z "$CODE_COVERAGE" ]]; then
|
|||
else
|
||||
echo " -> Running Functional tests with code coverage"
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
echo " -> making hard link clones"
|
||||
cd ..
|
||||
cp -RlP kibana "kibana${CI_GROUP}"
|
||||
cd "kibana${CI_GROUP}"
|
||||
|
||||
echo " -> running tests from the clone folder"
|
||||
yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}";
|
||||
fi
|
||||
|
||||
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
|
||||
cp -R target/kibana-coverage/functional/. ../kibana/target/kibana-coverage/functional/
|
||||
fi
|
||||
fi
|
|
@ -16,5 +16,20 @@ if [[ -z "$CODE_COVERAGE" ]]; then
|
|||
else
|
||||
echo " -> Running X-Pack functional tests with code coverage"
|
||||
export NODE_OPTIONS=--max_old_space_size=8192
|
||||
|
||||
echo " -> making hard link clones"
|
||||
cd ..
|
||||
cp -RlP kibana "kibana${CI_GROUP}"
|
||||
cd "kibana${CI_GROUP}/x-pack"
|
||||
|
||||
echo " -> running tests from the clone folder"
|
||||
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP"
|
||||
fi
|
||||
|
||||
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
|
||||
cp -R ../target/kibana-coverage/functional/. ../../kibana/target/kibana-coverage/functional/
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue