Skip to content

Commit 73d114f

Browse files
authored
Merge pull request #153 from Cray-HPE/active-spoiler
2 parents df4af3f + be84cdc commit 73d114f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/shellspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
continue-on-error: false
8181
shell: bash
8282
run: |
83-
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json
83+
make load-sls
8484
8585
- name: Run shellspec
8686
shell: bash

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ canitest.yml
4040
canitestdb.json
4141
canitestdb.log
4242
canitest_export.csv
43+
44+
# support repos
45+
hms-simulation-environment/
46+
shellspec/

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ shellspec:
139139
validate-hardware-type-schemas:
140140
go run ./pkg/hardwaretypes/validate pkg/hardwaretypes/hardware-types/schema pkg/hardwaretypes/hardware-types/
141141

142+
sim-setup:
143+
@if ! [ -d hms-simulation-environment ]; then \
144+
git clone https://github.com/Cray-HPE/hms-simulation-environment.git; \
145+
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json; \
146+
fi
147+
148+
load-sls:
149+
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json
150+
151+
spec-setup:
152+
@if ! [ -d ./shellspec ]; then \
153+
git clone https://github.com/shellspec/shellspec.git; \
154+
ln -s "$(shell pwd)"/shellspec/shellspec /usr/local/bin/; \
155+
fi
156+
142157
unittest: bin
143158
GOOS=$(GOOS) GOARCH=$(GOARCH) go test -cover \
144159
github.com/Cray-HPE/cani/internal/inventory \
@@ -149,7 +164,7 @@ unittest: bin
149164
github.com/Cray-HPE/cani/internal/provider/csm/validate/checks \
150165
github.com/Cray-HPE/cani/internal/provider/csm/validate/common
151166

152-
spec: bin
167+
functional: bin
153168
./spec/support/bin/cani_integrate.sh functional
154169

155170
integrate: bin
@@ -158,7 +173,7 @@ integrate: bin
158173
edge: bin
159174
./spec/support/bin/cani_integrate.sh edge
160175

161-
test: bin validate-hardware-type-schemas unittest spec integrate edge
176+
test: bin validate-hardware-type-schemas unittest functional integrate edge
162177

163178
tools:
164179
go install golang.org/x/lint/golint@latest

0 commit comments

Comments
 (0)