Skip to content

Commit 17232c9

Browse files
committed
test: for kind tests, place current profiles under non-gpu/ subdirectory
1 parent a354203 commit 17232c9

File tree

8 files changed

+19
-9
lines changed

8 files changed

+19
-9
lines changed

.github/workflows/kind.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
node-version: [16.x]
17-
profile: [keep-it-simple, ray-autoscaler, mcad-default, mcad-coscheduler, mcad-preinstalled]
17+
profile: [non-gpu/keep-it-simple, non-gpu/ray-autoscaler, non-gpu/mcad-default, non-gpu/mcad-coscheduler, non-gpu/mcad-preinstalled]
1818

1919
steps:
2020
- uses: actions/checkout@v3

tests/kind/run.sh

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
#
4+
# -a: force re-answering all questions
5+
# -f <profile>: force re-answering for given profile
6+
# -s: guidebook store root
7+
# -b: run this guidebook
8+
#
9+
310
set -e
411
set -o pipefail
512

@@ -29,20 +36,23 @@ do
2936
done
3037
shift $((OPTIND-1))
3138

32-
mkdir -p "$MWPROFILES_PATH"
33-
3439
function run {
35-
local profile=$1
40+
local profileFull=$1
41+
local variant=$(dirname $profileFull)
42+
local profile=$(basename $profileFull)
43+
export MWPROFILES_PATH="$MWPROFILES_PATH_BASE"/$variant
44+
mkdir -p "$MWPROFILES_PATH"
45+
3646
local guidebook=${2-$GUIDEBOOK}
37-
local yes=$([ -z "$FORCE_ALL" ] && [ "$FORCE" != "$profile" ] && [ -f "$MWPROFILES_PATH/$profile" ] && echo "--yes" || echo "")
47+
local yes=$([ -z "$FORCE_ALL" ] && [ "$FORCE" != "$profileFull" ] && [ -f "$MWPROFILES_PATH/$profile" ] && echo "--yes" || echo "")
3848

39-
local PRE="$MWPROFILES_PATH"/../profiles.d/$profile/pre
49+
local PRE="$MWPROFILES_PATH_BASE"/../profiles.d/$profile/pre
4050
if [ -f "$PRE" ]; then
41-
echo "Running pre guidebooks for profile $profile"
51+
echo "Running pre guidebooks for profile=$profile"
4252
cat "$PRE" | xargs -n1 "$ROOT"/bin/codeflare -p $profile $yes
4353
fi
4454

45-
echo "Running with profile $profile"
55+
echo "Running with variant=$variant profile=$profile yes=$yes"
4656
"$ROOT"/bin/codeflare -p $profile $yes $guidebook
4757
}
4858

tests/kind/values.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ SCRIPTDIR=$(cd $(dirname "$0") && pwd)
44
ROOT="$SCRIPTDIR"/../../
55
NODE=$(which node)
66
CODEFLARE_HEADLESS_HOME="$ROOT"/dist/headless
7-
export MWPROFILES_PATH="$SCRIPTDIR"/profiles
7+
export MWPROFILES_PATH_BASE="$SCRIPTDIR"/profiles

0 commit comments

Comments
 (0)