[commit: testsuite] master: Tidy up some tests (e56d57b)

Ian Lynagh igloo at earth.li
Sun Feb 3 21:03:47 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e56d57b75d050583b05b63863fcb791939a90349

>---------------------------------------------------------------

commit e56d57b75d050583b05b63863fcb791939a90349
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Feb 3 19:25:54 2013 +0000

    Tidy up some tests
    
    We now use pre_cmd rather than cmd_prefix wherever possible.
    Also, pass "-s --no-print-directory" whenever we use pre_cmd.

>---------------------------------------------------------------

 tests/annotations/should_run/all.T |    2 +-
 tests/concurrent/should_run/all.T  |    2 +-
 tests/ffi/should_run/all.T         |   12 ++++++------
 tests/ghci/scripts/all.T           |    2 +-
 tests/rts/all.T                    |   13 +++++++------
 5 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/tests/annotations/should_run/all.T b/tests/annotations/should_run/all.T
index 22256b2..871b409 100644
--- a/tests/annotations/should_run/all.T
+++ b/tests/annotations/should_run/all.T
@@ -10,7 +10,7 @@ test('annrun01',
      [extra_clean(['Annrun01_Help.hi', 'Annrun01_Help.o',
                     'annrun01.hi', 'annrun01.o',
                     'Config.hs', 'Config.hi', 'Config.o']),
-      pre_cmd('$MAKE -s config'),
+      pre_cmd('$MAKE -s --no-print-directory config'),
       omit_ways(['profasm','profthreaded', 'dyn'])],
       multimod_compile_and_run,
       ['annrun01', '-package ghc']
diff --git a/tests/concurrent/should_run/all.T b/tests/concurrent/should_run/all.T
index 356cdbc..ec867ed 100644
--- a/tests/concurrent/should_run/all.T
+++ b/tests/concurrent/should_run/all.T
@@ -204,7 +204,7 @@ test('conc058', only_compiler_types(['ghc']), compile_and_run, [''])
 test('conc059',
      [only_compiler_types(['ghc']),
       only_ways(['threaded1','threaded2']),
-      compile_cmd_prefix('$MAKE conc059_setup && '),
+      pre_cmd('$MAKE -s --no-print-directory conc059_setup'),
       extra_clean(['conc059_c.o'])],
      compile_and_run,
      ['conc059_c.c -no-hs-main'])
diff --git a/tests/ffi/should_run/all.T b/tests/ffi/should_run/all.T
index 7727492..1811f42 100644
--- a/tests/ffi/should_run/all.T
+++ b/tests/ffi/should_run/all.T
@@ -13,7 +13,7 @@ test('fed001', compose(only_compiler_types(['ghc']),
 test('ffi001', omit_ways(['ghci']), compile_and_run, [''])
 test('ffi002', [ omit_ways(['ghci']),
                  extra_clean(['ffi002_c.o']),
-                 compile_cmd_prefix('$MAKE ffi002_setup && ') ],
+                 pre_cmd('$MAKE -s --no-print-directory ffi002_setup') ],
                  # The ffi002_setup hack is to ensure that we generate
                  # ffi002_stub.h before compiling ffi002_c.c, which
                  # needs it.
@@ -109,7 +109,7 @@ test('ffi018', [ omit_ways(['ghci']), extra_clean(['ffi018_c.o']) ],
                compile_and_run, ['ffi018_c.c'])
 
 test('ffi018_ghci', [ only_ways(['ghci']),
-                      cmd_prefix('$MAKE ffi018_ghci_setup && '),
+                      pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup'),
                       extra_clean(['ffi018_ghci_c.o']) ],
                     compile_and_run, ['ffi018_ghci_c.o'])
 
@@ -122,7 +122,7 @@ test('T1288', [ omit_ways(['ghci']),
                 extra_clean(['T1288_c.o']) ],
               compile_and_run, ['T1288_c.c'])
 test('T1288_ghci', [ only_ways(['ghci']),
-                     cmd_prefix('$MAKE --no-print-directory T1288_ghci_setup && '),
+                     pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup'),
                      extra_clean(['T1288_ghci_c.o']) ],
                    compile_and_run, ['T1288_ghci_c.o'])
 
@@ -130,7 +130,7 @@ test('T2276', [ omit_ways(['ghci']),
                 extra_clean(['T2276_c.o']) ],
               compile_and_run, ['T2276_c.c'])
 test('T2276_ghci', [ only_ways(['ghci']),
-                     cmd_prefix('$MAKE --no-print-directory T2276_ghci_setup && '),
+                     pre_cmd('$MAKE -s --no-print-directory T2276_ghci_setup'),
                      extra_clean(['T2276_ghci_c.o']) ],
                    compile_and_run, ['-fobject-code T2276_ghci_c.o'])
 
@@ -177,12 +177,12 @@ test('T5402', [ omit_ways(['ghci']),
                   # The T5402_setup hack is to ensure that we generate
                   # T5402_stub.h before compiling T5402_main.c, which
                   # needs it.
-                compile_cmd_prefix('$MAKE --no-print-directory T5402_setup && ') ],
+                pre_cmd('$MAKE -s --no-print-directory T5402_setup') ],
               compile_and_run, ["-no-hs-main T5402_main.c"])
 
 test('T5594', [ omit_ways(['ghci']),
                 extra_clean(['T5594_c.o']),
-                compile_cmd_prefix('$MAKE --no-print-directory T5594_setup && ') ],
+                pre_cmd('$MAKE -s --no-print-directory T5594_setup') ],
                 # The T5594_setup hack is to ensure that we generate
                 # T5594_stub.h before compiling T5594_c.c, which
                 # needs it.
diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T
index b4dd448..f204af7 100755
--- a/tests/ghci/scripts/all.T
+++ b/tests/ghci/scripts/all.T
@@ -76,7 +76,7 @@ test('ghci055', combined_output, ghci_script, ['ghci055.script'])
 
 test('ghci056',
      [
-       cmd_prefix('$MAKE --no-print-directory ghci056_setup && '),
+       pre_cmd('$MAKE -s --no-print-directory ghci056_setup'),
        extra_run_opts('ghci056_c.o'),
        extra_clean('ghci056_c.o')
      ],
diff --git a/tests/rts/all.T b/tests/rts/all.T
index 50c6b3b..00f9475 100644
--- a/tests/rts/all.T
+++ b/tests/rts/all.T
@@ -85,9 +85,9 @@ test('T2615',
        if_os('darwin', skip),
        # Solaris' linker does not support GNUish linker scripts
        if_os('solaris2', skip),
-       cmd_prefix('$MAKE T2615-prep && ' +
-                  # Add current directory to dlopen search path
-                  'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. '),
+       pre_cmd('$MAKE -s --no-print-directory T2615-prep'),
+       # Add current directory to dlopen search path
+       cmd_prefix('LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. '),
        extra_clean(['libfoo_T2615.so', 'libfoo_T2615.o'])],
      compile_and_run,
      ['-package ghc'])
@@ -106,7 +106,8 @@ test('T4059',
 # Test for #4274
 test('exec_signals', [
      if_os('mingw32', skip),
-     cmd_prefix('$MAKE exec_signals-prep && ./exec_signals_prepare'),
+     pre_cmd('$MAKE -s --no-print-directory exec_signals-prep'),
+     cmd_prefix('./exec_signals_prepare'),
      extra_clean(['exec_signals_child', 'exec_signals_prepare'])
     ], compile_and_run, [''])
 
@@ -136,7 +137,7 @@ test('T5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, [''])
 
 test('T6006', [ omit_ways(prof_ways + ['ghci']),
                  extra_clean(['T6006_c.o']),
-                 compile_cmd_prefix('$MAKE T6006_setup && ') ],
+                 pre_cmd('$MAKE -s --no-print-directory T6006_setup') ],
                  # The T6006_setup hack is to ensure that we generate
                  # T6006_stub.h before compiling T6006_c.c, which
                  # needs it.
@@ -154,7 +155,7 @@ test('T7040', [ extra_clean(['T7040_c.o']), omit_ways(['ghci']) ],
      compile_and_run, ['T7040_c.c'])
 
 test('T7040_ghci', [ only_ways(['ghci']),
-                      cmd_prefix('$MAKE T7040_ghci_setup && '),
+                      pre_cmd('$MAKE -s --no-print-directory T7040_ghci_setup'),
                       extra_clean(['T7040_ghci_c.o']) ],
                     compile_and_run, ['T7040_ghci_c.o'])
 





More information about the ghc-commits mailing list