Skip to content

Commit

Permalink
Make end-to-end test more realistic
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Mar 17, 2024
1 parent c38589f commit 4b4dae5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: make -C src unit-test

- name: End-to-end test
run: echo hi | make -C src e2e-test
run: make -C src e2e-test
7 changes: 6 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ rl_driver: rl_driver.c
$(SHARED_LIB): $(RL_SRC)
$(CC) $(SHARED_FLAGS) $(CFLAGS) $(LDFLAGS) $(RL_SRC) -o $@ -ldl $(SHARED_LIB_LIB)

e2e-test: $(PROGS) # Help: Invoke the library with a readline read/print loop
e2e-run: $(PROGS) # Help: Invoke the library with a readline read/print loop
$(PRELOAD_VAR)=`pwd`/$(SHARED_LIB) $(SET_ADD_LIB) ./rl_driver

e2e-test: $(PROGS) # Help: Test the readline hook
printf 'Open the pod bay doors HAL\eV' | \
$(PRELOAD_VAR)=`pwd`/$(SHARED_LIB) $(SET_ADD_LIB) AI_CLI_general_api=hal ./rl_driver | \
grep Dave

all-tests: $(TEST_SRC) $(RL_SRC)
$(CC) -DUNIT_TEST $(CFLAGS) $(LDFLAGS) all_tests.c $(TEST_SRC) $(RL_SRC) CuTest.c $(LIB) -ldl -lreadline -o $@

Expand Down

0 comments on commit 4b4dae5

Please sign in to comment.