Add more memes to makefile
This commit is contained in:
parent
ce744d9983
commit
5351d159d1
54
Makefile
54
Makefile
|
@ -1,21 +1,51 @@
|
|||
.PHONY: all test clean
|
||||
.PHONY: all test clean upload submit stage-test
|
||||
|
||||
SOURCES=Makefile router README.md $(shell find . -path ./build -prune -o -iname '*.rkt' -print)
|
||||
|
||||
TESTS_DIR=build
|
||||
CONTAINER_DIR=$(TESTS_DIR)/container
|
||||
TEST_SIM_PKG=https://course.ccs.neu.edu/cs3700sp20/archive/bgp-sim.tar.gz
|
||||
|
||||
CCIS_TEAM_NAME=hash-lang-uwu
|
||||
CCIS_PROJECT_NAME=project2-milestone
|
||||
CCIS_SERVER=login.ccs.neu.edu
|
||||
CCIS_PATH=CS3700/$(CCIS_PROJECT_NAME)/
|
||||
CCIS_FMT_CHECK=/course/cs3700sp20/code/project2/project2_format_check.py
|
||||
CCIS_TURNIN=/course/cs3700sp20/bin/turnin
|
||||
|
||||
|
||||
all:
|
||||
|
||||
$(TESTS_DIR): $(TESTS_DIR)/sim
|
||||
mkdir -p $(TESTS_DIR)
|
||||
sudo ./scripts/nspawn-support.sh create $(TESTS_DIR)/container
|
||||
|
||||
$(TESTS_DIR)/sim:
|
||||
mkdir -p $(TESTS_DIR)
|
||||
cd $(TESTS_DIR) && wget -O bgp-sim.tar.gz $(TEST_SIM_PKG)
|
||||
cd $(TESTS_DIR) && tar xf bgp-sim.tar.gz
|
||||
@echo "This recipe intentionally left blank"
|
||||
|
||||
clean:
|
||||
sudo $(RM) -r $(TESTS_DIR)
|
||||
|
||||
test: $(TESTS_DIR)
|
||||
sudo ./scripts/nspawn-support.sh boot $(TESTS_DIR)/container
|
||||
|
||||
$(TESTS_DIR):
|
||||
mkdir -p $(TESTS_DIR)
|
||||
cd $(TESTS_DIR) && wget -O bgp-sim.tar.gz $(TEST_SIM_PKG)
|
||||
cd $(TESTS_DIR) && tar xf bgp-sim.tar.gz
|
||||
|
||||
$(CONTAINER_DIR):
|
||||
mkdir -p $(TESTS_DIR)
|
||||
sudo ./scripts/nspawn-support.sh create $(CONTAINER_DIR)
|
||||
|
||||
test: $(TESTS_DIR) $(CONTAINER_DIR)
|
||||
sudo ./scripts/nspawn-support.sh boot $(CONTAINER_DIR)
|
||||
|
||||
|
||||
upload: $(SOURCES)
|
||||
@rsync -avzzR --progress $^ $(CCIS_SERVER):$(CCIS_PATH)
|
||||
@ssh $(CCIS_SERVER) -t -- "tput bold; $(CCIS_FMT_CHECK) $(CCIS_PATH); tput sgr0"
|
||||
|
||||
stage-test: upload
|
||||
ssh $(CCIS_SERVER) -t -- "cd $(CCIS_PATH); make ccis-test && make ccis-clean"
|
||||
|
||||
submit: upload
|
||||
ssh $(CCIS_SERVER) -t -- "cd $(CCIS_PATH); make ccis-clean; $(CCIS_TURNIN) $(CCIS_PROJECT_NAME) $(CCIS_PATH)"
|
||||
|
||||
ccis-test: $(TESTS_DIR)
|
||||
cd $(TESTS_DIR) && ./sim --router ../router milestone
|
||||
|
||||
ccis-clean:
|
||||
$(RM) -r $(TESTS_DIR)
|
||||
|
|
Loading…
Reference in New Issue