Daniel Berger | 15 May 06:24
Picon

Strange bug with common.mk, File, Test::Unit

Hi all,

Ruby 1.8.6-p114
OS X, Solaris, Windows XP and Linux

I added a couple of test tasks in the common.mk file so that I could 
test specific subsets of test files. Below are just two that I added.

daniel-bergers-computer:~/src/ruby/ruby-1.8.6-p114 djberge$ diff -u 
common.orig common.mk
--- common.orig 2007-02-28 06:23:42.000000000 -0700
+++ common.mk   2008-05-14 22:09:14.000000000 -0600
@@ -66,6 +66,8 @@
                         $(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)

  TESTSDIR      = $(srcdir)/test
+TESTSDIR_ARRAY = $(srcdir)/test/core/Array
+TESTSDIR_FILE = $(srcdir)/test/core/File
  TESTWORKDIR   = testwork

  all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
@@ -286,6 +288,12 @@
  test-all:
         $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR)" 
--runner=$(TESTUI) $(TESTS)

+test-array:
+       $(RUNRUBY) "$(srcdir)/test/runner.rb" 
--basedir="$(TESTSDIR_ARRAY)" --runner=$(TESTUI) $(TESTS)
+
(Continue reading)

Nobuyoshi Nakada | 15 May 09:54
Favicon

Re: Strange bug with common.mk, File, Test::Unit

Hi,

At Thu, 15 May 2008 13:28:31 +0900,
Daniel Berger wrote in [ruby-core:16777]:
> daniel-bergers-computer:~/src/ruby/ruby-1.8.6-p114 djberge$ make test-array
> ./miniruby  ./runruby.rb --extout=.ext -- "./test/runner.rb" 
> --basedir="./test/core/Array" --runner=console
> Loaded suite .
> Started
> 
> Finished in 0.000144 seconds.
> 
> 0 tests, 0 assertions, 0 failures, 0 errors
> 
> Ok, no problem, the directory doesn't exist, so no tests run.

Really?  I get the error like your test-file, with

$ make TESTSDIR='$(srcdir)/test/core/Array' test-all

> What the heck is going on here? Some sort of strange scoping bug with 
> regards to "File"? I can't narrow it down.

it rather seems a problem that test-arry works.

--

-- 
Nobu Nakada


Gmane