Skip to content

Commit

Permalink
Revert "[qe] unified darwin and linux scripts to execute integration …
Browse files Browse the repository at this point in the history
…and e2e tests remotely"

This reverts commit 0f14537.

the ${OS} variable referred to on the scripts is only present when
running inside the container, we'll have to figure out a different
way to get the OS information when running on the host
  • Loading branch information
anjannath committed Jun 3, 2024
1 parent 7b16784 commit d9e501b
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 5 deletions.
1 change: 0 additions & 1 deletion images/build-e2e/lib/darwin/run.sh

This file was deleted.

60 changes: 60 additions & 0 deletions images/build-e2e/lib/darwin/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

# Parameters
bundleLocation=""
e2eTagExpression=""
crcMemory=""
targetFolder="crc-e2e"
junitFilename="e2e-junit.xml"
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-bundleLocation)
bundleLocation="$2"
shift
shift
;;
-e2eTagExpression)
e2eTagExpression="$2"
shift
shift
;;
-targetFolder)
targetFolder="$2"
shift
shift
;;
-junitFilename)
junitFilename="$2"
shift
shift
;;
-crcMemory)
crcMemory="$2"
shift
shift
;;
*) # unknown option
shift
;;
esac
done

# Prepare resuslts folder
mkdir -p $targetFolder/results

# Run tests
tags="darwin"
if [ ! -z "$e2eTagExpression" ]
then
tags="$tags && $e2eTagExpression"
fi
cd $targetFolder/bin
./e2e.test --bundle-location=$bundleLocation --pull-secret-file="${HOME}/$targetFolder/pull-secret" --cleanup-home=false --crc-memory=$crcMemory --godog.tags="$tags" --godog.format=junit > "${HOME}/$targetFolder/results/e2e.results"

# Transform results to junit
cd ..
init_line=$(grep -n '<?xml version="1.0" encoding="UTF-8"?>' results/e2e.results | awk '{split($0,n,":"); print n[1]}')
tail -n +$init_line results/e2e.results > results/$junitFilename
# Copy logs and diagnose
cp -r bin/out/test-results/* results
4 changes: 2 additions & 2 deletions images/build-e2e/lib/linux/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
*)
*) # unknown option
shift
;;
esac
Expand All @@ -44,7 +44,7 @@ done
mkdir -p $targetFolder/results

# Run tests
tags="${OS}"
tags="linux"
if [ ! -z "$e2eTagExpression" ]
then
tags="$tags && $e2eTagExpression"
Expand Down
1 change: 0 additions & 1 deletion images/build-integration/lib/darwin/run.sh

This file was deleted.

63 changes: 63 additions & 0 deletions images/build-integration/lib/darwin/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

# Parameters
bundleLocation=""
targetFolder="crc-integration"
junitFilename="integration-junit.xml"
suiteTimeout="90m"
labelFilter=""
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-bundleLocation)
bundleLocation="$2"
shift
shift
;;
-targetFolder)
targetFolder="$2"
shift
shift
;;
-junitFilename)
junitFilename="$2"
shift
shift
;;
-suiteTimeout)
suiteTimeout="$2"
shift
shift
;;
-labelFilter)
labelFilter="$2"
shift
shift
*) # unknown option
shift
;;
esac
done

# Prepare resuslts folder
mkdir -p $targetFolder/results

# Run tests
export PATH="$PATH:${HOME}/$targetFolder/bin"
export PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret"
if [ ! -z "$bundleLocation" ]
then
export BUNDLE_PATH="$bundleLocation"
fi
cd $targetFolder/bin
if [ ! -z "$labelFilter" ]
then
./integration.test --ginkgo.timeout $suiteTimeout --ginkgo.label-filter $labelFilter > integration.results
else
./integration.test --ginkgo.timeout $suiteTimeout > integration.results
fi

# Copy results
cd ..
cp bin/integration.results results/integration.results
cp bin/out/integration.xml results/$junitFilename
2 changes: 1 addition & 1 deletion images/build-integration/lib/linux/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
*)
*) # unknown option
shift
;;
esac
Expand Down

0 comments on commit d9e501b

Please sign in to comment.