Skip to content

Commit 4b4dae5

Browse files
committed
Make end-to-end test more realistic
1 parent c38589f commit 4b4dae5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: make -C src unit-test
3737

3838
- name: End-to-end test
39-
run: echo hi | make -C src e2e-test
39+
run: make -C src e2e-test

src/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ rl_driver: rl_driver.c
6060
$(SHARED_LIB): $(RL_SRC)
6161
$(CC) $(SHARED_FLAGS) $(CFLAGS) $(LDFLAGS) $(RL_SRC) -o $@ -ldl $(SHARED_LIB_LIB)
6262

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

66+
e2e-test: $(PROGS) # Help: Test the readline hook
67+
printf 'Open the pod bay doors HAL\eV' | \
68+
$(PRELOAD_VAR)=`pwd`/$(SHARED_LIB) $(SET_ADD_LIB) AI_CLI_general_api=hal ./rl_driver | \
69+
grep Dave
70+
6671
all-tests: $(TEST_SRC) $(RL_SRC)
6772
$(CC) -DUNIT_TEST $(CFLAGS) $(LDFLAGS) all_tests.c $(TEST_SRC) $(RL_SRC) CuTest.c $(LIB) -ldl -lreadline -o $@
6873

0 commit comments

Comments
 (0)