Skip to content

Commit

Permalink
Check package to test in benchmark in every loop
Browse files Browse the repository at this point in the history
Check which package is being tested in case of benchmark suite, but
keeping all these test packages in the same step.
  • Loading branch information
mrodm committed Jun 28, 2023
1 parent 182d988 commit 4514587
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .buildkite/pipeline.trigger.integration.tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,8 @@ CHECK_PACKAGES_TESTS=(
test-check-packages-benchmarks
)
for test in ${CHECK_PACKAGES_TESTS[@]}; do
options=""
if [ "${test}" == "test-check-packages-benchmarks" ]; then
package_name=$(basename ${package})
options="-p ${package_name}"
fi
echo " - label: \":go: Running integration test: ${test}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t ${test} ${options}"
echo " command: ./.buildkite/scripts/integration_tests.sh -t ${test}"
echo " agents:"
echo " provider: \"gcp\""
echo " artifact_paths:"
Expand Down
12 changes: 7 additions & 5 deletions scripts/test-check-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,23 @@ for d in test/packages/${PACKAGE_TEST_TYPE:-other}/${PACKAGE_UNDER_TEST:-*}/; do
elastic-package install -v

if [ "${PACKAGE_TEST_TYPE:-other}" == "benchmarks" ]; then
if [ "${PACKAGE_UNDER_TEST:-*}" == "pipeline_benchmark" ]; then
# It is not used PACKAGE_UNDER_TEST, so all benchmark packages are run in the same loop
package_to_test=$(basename ${d})
if [ "${package_to_test}" == "pipeline_benchmark" ]; then
rm -rf "${OLDPWD}/build/benchmark-results"
elastic-package benchmark pipeline -v --report-format xUnit --report-output file --fail-on-missing

rm -rf "${OLDPWD}/build/benchmark-results-old"
mv "${OLDPWD}/build/benchmark-results" "${OLDPWD}/build/benchmark-results-old"

elastic-package benchmark pipeline -v --report-format json --report-output file --fail-on-missing

elastic-package report --fail-on-missing benchmark \
--new ${OLDPWD}/build/benchmark-results \
--old ${OLDPWD}/build/benchmark-results-old \
--threshold 1 --report-output-path="${OLDPWD}/build/benchreport"
fi
if [ "${PACKAGE_UNDER_TEST:-*}" == "system_benchmark" ]; then
if [ "${package_to_test}" == "system_benchmark" ]; then
elastic-package benchmark system --benchmark logs-benchmark -v --defer-cleanup 1s
fi
else
Expand Down

0 comments on commit 4514587

Please sign in to comment.