Split test suite into common and platform dependent parts.

pull/15/head
Jussi Pakkanen 12 years ago
parent 83caae1bcb
commit 9262fe600a
  1. 23
      run_tests.py
  2. 0
      test cases/common/1 trivial/meson.build
  3. 0
      test cases/common/1 trivial/trivial.c
  4. 0
      test cases/common/10 man install/bar.2
  5. 0
      test cases/common/10 man install/foo.1
  6. 0
      test cases/common/10 man install/meson.build
  7. 0
      test cases/common/11 subdir/meson.build
  8. 0
      test cases/common/11 subdir/subdir/meson.build
  9. 0
      test cases/common/11 subdir/subdir/prog.c
  10. 0
      test cases/common/12 data/datafile.dat
  11. 0
      test cases/common/12 data/meson.build
  12. 0
      test cases/common/13 pch/meson.build
  13. 0
      test cases/common/13 pch/pch/prog.h
  14. 0
      test cases/common/13 pch/prog.c
  15. 0
      test cases/common/14 cxx pch/meson.build
  16. 0
      test cases/common/14 cxx pch/pch/prog.hh
  17. 0
      test cases/common/14 cxx pch/prog.cc
  18. 0
      test cases/common/15 mixed pch/func.c
  19. 0
      test cases/common/15 mixed pch/main.cc
  20. 0
      test cases/common/15 mixed pch/meson.build
  21. 0
      test cases/common/15 mixed pch/pch/func.h
  22. 0
      test cases/common/15 mixed pch/pch/main.hh
  23. 0
      test cases/common/16 configure file/config.h.in
  24. 0
      test cases/common/16 configure file/meson.build
  25. 0
      test cases/common/17 if/meson.build
  26. 0
      test cases/common/17 if/prog.c
  27. 0
      test cases/common/18 else/meson.build
  28. 0
      test cases/common/18 else/prog.c
  29. 0
      test cases/common/19 comparison/meson.build
  30. 0
      test cases/common/19 comparison/prog.c
  31. 0
      test cases/common/2 cxx/meson.build
  32. 0
      test cases/common/2 cxx/trivial.cc
  33. 0
      test cases/common/20 array/func.c
  34. 0
      test cases/common/20 array/meson.build
  35. 0
      test cases/common/20 array/prog.c
  36. 0
      test cases/common/21 includedir/include/func.h
  37. 0
      test cases/common/21 includedir/meson.build
  38. 0
      test cases/common/21 includedir/src/func.c
  39. 0
      test cases/common/21 includedir/src/meson.build
  40. 0
      test cases/common/21 includedir/src/prog.c
  41. 0
      test cases/common/22 header in file list/header.h
  42. 0
      test cases/common/22 header in file list/meson.build
  43. 0
      test cases/common/22 header in file list/prog.c
  44. 0
      test cases/common/23 global arg/meson.build
  45. 0
      test cases/common/23 global arg/prog.c
  46. 0
      test cases/common/23 global arg/prog.cc
  47. 0
      test cases/common/24 target arg/func.c
  48. 0
      test cases/common/24 target arg/meson.build
  49. 0
      test cases/common/24 target arg/prog.cc
  50. 0
      test cases/common/25 numbers/meson.build
  51. 0
      test cases/common/25 numbers/prog.c
  52. 0
      test cases/common/26 endian/meson.build
  53. 0
      test cases/common/26 endian/prog.c
  54. 0
      test cases/common/27 library versions/lib.c
  55. 0
      test cases/common/27 library versions/meson.build
  56. 0
      test cases/common/28 config subdir/include/config.h.in
  57. 0
      test cases/common/28 config subdir/include/meson.build
  58. 0
      test cases/common/28 config subdir/meson.build
  59. 0
      test cases/common/28 config subdir/src/meson.build
  60. 0
      test cases/common/28 config subdir/src/prog.c
  61. 0
      test cases/common/29 pipeline/input_src.dat
  62. 0
      test cases/common/29 pipeline/meson.build
  63. 0
      test cases/common/29 pipeline/prog.c
  64. 0
      test cases/common/29 pipeline/srcgen.c
  65. 0
      test cases/common/3 static/libfile.c
  66. 0
      test cases/common/3 static/meson.build
  67. 0
      test cases/common/30 pipeline/input_src.dat
  68. 0
      test cases/common/30 pipeline/meson.build
  69. 0
      test cases/common/30 pipeline/prog.c
  70. 0
      test cases/common/30 pipeline/srcgen.c
  71. 0
      test cases/common/4 shared/libfile.c
  72. 0
      test cases/common/4 shared/meson.build
  73. 0
      test cases/common/5 linkstatic/libfile.c
  74. 0
      test cases/common/5 linkstatic/main.c
  75. 0
      test cases/common/5 linkstatic/meson.build
  76. 0
      test cases/common/6 linkshared/libfile.c
  77. 0
      test cases/common/6 linkshared/main.c
  78. 0
      test cases/common/6 linkshared/meson.build
  79. 0
      test cases/common/7 mixed/func.c
  80. 0
      test cases/common/7 mixed/main.cc
  81. 0
      test cases/common/7 mixed/meson.build
  82. 0
      test cases/common/8 install/meson.build
  83. 0
      test cases/common/8 install/prog.c
  84. 0
      test cases/common/8 install/shar.c
  85. 0
      test cases/common/8 install/stat.c
  86. 0
      test cases/common/9 header install/meson.build
  87. 0
      test cases/common/9 header install/rootdir.h
  88. 0
      test cases/common/9 header install/subdir.h
  89. 0
      test cases/linuxlike/1 pkg-config/meson.build
  90. 0
      test cases/linuxlike/1 pkg-config/prog.c

@ -16,6 +16,7 @@
from glob import glob
import os, subprocess, shutil, sys
import environment
test_build_dir = 'work area'
install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir')
@ -56,11 +57,22 @@ def run_test(testdir):
if pi.returncode != 0:
raise RuntimeError('Running install failed.')
def run_tests():
tests = [t.split('/', 1)[1] for t in glob('test cases/*')]
def gather_tests(testdir):
tests = [t.split('/', 2)[2] for t in glob(os.path.join(testdir, '*'))]
testlist = [(int(t.split()[0]), t) for t in tests]
testlist.sort()
tests = [os.path.join('test cases', t[1]) for t in testlist]
tests = [os.path.join(testdir, t[1]) for t in testlist]
return tests
def run_tests():
commontests = gather_tests('test cases/common')
if environment.is_osx():
platformtests = gather_tests('test cases/osx')
elif environment.is_windows():
platformtests = gather_tests('test cases/windows')
else:
platformtests = gather_tests('test cases/linuxlike')
try:
os.mkdir(test_build_dir)
except OSError:
@ -69,7 +81,10 @@ def run_tests():
os.mkdir(install_dir)
except OSError:
pass
[run_test(t) for t in tests]
print('Running common tests.')
[run_test(t) for t in commontests]
print('Running platform dependent tetss')
[run_test(t) for t in platformtests]
if __name__ == '__main__':
os.chdir(os.path.split(__file__)[0])

Loading…
Cancel
Save