From 0e7d5a2e4bcca01a41ea00324261818440808e6f Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Sat, 22 Sep 2012 01:16:26 +0800 Subject: Move Gem Tests into the main Test target --- test/Makefile | 7 +++++-- test/init_mrbtest.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index 18bc79b5a..efabdc367 100644 --- a/test/Makefile +++ b/test/Makefile @@ -68,13 +68,16 @@ $(OBJS) : %.o : %.c $(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $< -o $@ # Compile C source from merged mruby source -$(CLIB) : $(RLIB) $(MRBC) $(INIT) - $(MRBC) -Bmrbtest_irep -o$(DLIB) $(RLIB); $(CAT) $(INIT) $(DLIB) > $@ +$(CLIB) : ../mrbgems/g/mrbgemtest.ctmp $(RLIB) $(MRBC) $(INIT) + $(MRBC) -Bmrbtest_irep -o$(DLIB) $(RLIB); $(CAT) $(INIT) $(DLIB) ../mrbgems/g/mrbgemtest.ctmp > $@ # merge mruby sources $(RLIB) : $(ASSLIB) $(MRBS) $(CAT) $(ASSLIB) $(MRBS) > $@ +../mrbgems/g/mrbgemtest.ctmp : + @$(MAKE) prepare-test -C ../mrbgems + # clean up .PHONY : clean clean : diff --git a/test/init_mrbtest.c b/test/init_mrbtest.c index b9f09dd2f..2bc2f2e4b 100644 --- a/test/init_mrbtest.c +++ b/test/init_mrbtest.c @@ -5,13 +5,16 @@ #include "mruby/proc.h" extern const char mrbtest_irep[]; +extern const char mrbgemtest_irep[]; void mrb_init_mrbtest(mrb_state *mrb) { int n = mrb_read_irep(mrb, mrbtest_irep); + int m = mrb_read_irep(mrb, mrbgemtest_irep); mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb)); + mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[m]), mrb_top_self(mrb)); if (mrb->exc) { mrb_p(mrb, mrb_obj_value(mrb->exc)); exit(0); -- cgit v1.2.3