Skip to content

Commit

Permalink
Update old testbed make target to fixture- for new fixtures layout (v…
Browse files Browse the repository at this point in the history
…ercel#4538)

### Description

`make fixture-<some directory under integration_tests/_fixtures>` will
populate the `testbed` directory with an initialized copy of the
fixture. This is useful for pairing with the `testbed` task in
`launch.json` to debug a particular integration test.

### Testing Instructions

Verified manually
  • Loading branch information
gsoltis authored and NicholasLYang committed Apr 21, 2023
1 parent c5fb426 commit 31f9306
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli/Makefile
Expand Up @@ -344,12 +344,12 @@ integration-tests: $(CRAM_ENV)/bin/prysk $(CRAM_ENV)/bin/pytest turbo $(INTEGRAT
integration-tests-interactive: $(CRAM_ENV)/bin/prysk turbo $(INTEGRATION_TEST_FILES) corepack turbo
$(CRAM_ENV)/bin/prysk --shell=`which bash` -i $(INTEGRATION_TEST_FILES)

# use target testbed-<some directory under integration_tests> to set up the testbed directory
.PHONY=testbed-%
testbed-%:
$(eval $@_TEST := $(@:testbed-%=%))
@echo "testbed setup $($@_TEST)"
# use target fixture-<some directory under integration_tests/_fixtures> to set up the testbed directory
.PHONY=fixture-%
fixture-%:
$(eval $@_FIXTURE := $(@:fixture-%=%))
@echo "fixture setup $($@_FIXTURE)"
rm -rf testbed
mkdir -p testbed
./integration_tests/$($@_TEST)/setup.sh testbed
./integration_tests/_helpers/setup_monorepo.sh ./testbed $($@_FIXTURE)

0 comments on commit 31f9306

Please sign in to comment.