Skip to content

Commit

Permalink
lab-1: Add automatic test in Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddy0402 committed Sep 20, 2014
1 parent 38fd546 commit 794d5fb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lab-1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ default: fibseq
fibseq: $(objects)
$(CC) $(LDFLAGS) -o $@ $^

fib.o: fib.s
fibseq.o: fibseq.c

%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<

Expand All @@ -24,11 +21,10 @@ clean:
rm -f $(objects) fibseq

QEMU_CMD = qemu-arm -L /usr/arm-linux-gnueabihf ./fibseq &
CMD = yes 9 | $(call QEMU_CMD) && sleep 1
qemu: fibseq
@yes 5 | $(call QEMU_CMD)
@sleep 1
@yes 6 | $(call QEMU_CMD)
@sleep 1
@yes 7 | $(call QEMU_CMD)
@sleep 1
test=1 ; while [ $$test -le 100 ] ; do \
yes $$test | $(call QEMU_CMD) \
sleep 1; \
test=`expr $$test + 1`; \
done

0 comments on commit 794d5fb

Please sign in to comment.