aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/174 preserve gendir
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-02-25 01:12:42 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-02-25 01:12:42 +0200
commit0c3af38c3ef90f27302aeaca1124bc2f4123ef12 (patch)
treee141b9d5cce20d6a502ae3ef711bc8277c71a2bf /test cases/common/174 preserve gendir
parent2488ccfa1c6fbb27623ed09238b8b5ea2be5ed10 (diff)
downloadmeson-0c3af38c3ef90f27302aeaca1124bc2f4123ef12.zip
meson-0c3af38c3ef90f27302aeaca1124bc2f4123ef12.tar.gz
meson-0c3af38c3ef90f27302aeaca1124bc2f4123ef12.tar.bz2
Renamed test dir with duplicate number.
Diffstat (limited to 'test cases/common/174 preserve gendir')
-rw-r--r--test cases/common/174 preserve gendir/base.inp1
-rw-r--r--test cases/common/174 preserve gendir/com/mesonbuild/subbie.inp1
-rwxr-xr-xtest cases/common/174 preserve gendir/genprog.py46
-rw-r--r--test cases/common/174 preserve gendir/meson.build13
-rw-r--r--test cases/common/174 preserve gendir/testprog.c6
5 files changed, 0 insertions, 67 deletions
diff --git a/test cases/common/174 preserve gendir/base.inp b/test cases/common/174 preserve gendir/base.inp
deleted file mode 100644
index df967b9..0000000
--- a/test cases/common/174 preserve gendir/base.inp
+++ /dev/null
@@ -1 +0,0 @@
-base
diff --git a/test cases/common/174 preserve gendir/com/mesonbuild/subbie.inp b/test cases/common/174 preserve gendir/com/mesonbuild/subbie.inp
deleted file mode 100644
index df0f4e9..0000000
--- a/test cases/common/174 preserve gendir/com/mesonbuild/subbie.inp
+++ /dev/null
@@ -1 +0,0 @@
-subbie
diff --git a/test cases/common/174 preserve gendir/genprog.py b/test cases/common/174 preserve gendir/genprog.py
deleted file mode 100755
index 1e10998..0000000
--- a/test cases/common/174 preserve gendir/genprog.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python3
-
-import os, sys, argparse
-
-h_templ = '''#pragma once
-
-int %s();
-'''
-
-c_templ = '''#include"%s.h"
-
-int %s() {
- return 0;
-}
-'''
-
-parser = argparse.ArgumentParser()
-parser.add_argument('--searchdir', required=True)
-parser.add_argument('--outdir', required=True)
-parser.add_argument('ifiles', nargs='+')
-
-options = parser.parse_args()
-
-searchdir = options.searchdir
-outdir = options.outdir
-ifiles = options.ifiles
-
-rel_ofiles = []
-
-for ifile in ifiles:
- if not ifile.startswith(options.searchdir):
- sys.exit('Input file %s does not start with search dir %s.' % (ifile, searchdir))
- rel_ofile = ifile[len(searchdir):]
- if rel_ofile[0] == '/' or rel_ofile[0] == '\\':
- rel_ofile = rel_ofile[1:]
- rel_ofiles.append(os.path.splitext(rel_ofile)[0])
-
-ofile_bases = [os.path.join(outdir, i) for i in rel_ofiles]
-
-for i, ifile_name in enumerate(ifiles):
- proto_name = open(ifile_name).readline().strip()
- h_out = ofile_bases[i] + '.h'
- c_out = ofile_bases[i] + '.c'
- os.makedirs(os.path.split(ofile_bases[i])[0], exist_ok=True)
- open(h_out, 'w').write(h_templ % (proto_name))
- open(c_out, 'w').write(c_templ % (proto_name, proto_name))
diff --git a/test cases/common/174 preserve gendir/meson.build b/test cases/common/174 preserve gendir/meson.build
deleted file mode 100644
index ce219f0..0000000
--- a/test cases/common/174 preserve gendir/meson.build
+++ /dev/null
@@ -1,13 +0,0 @@
-project('preserve subdir', 'c')
-
-gprog = find_program('genprog.py')
-
-gen = generator(gprog, \
- output : ['@BASENAME@.c', '@BASENAME@.h'],
- arguments : ['--searchdir=@CURRENT_SOURCE_DIR@', '--outdir=@BUILD_DIR@', '@INPUT@'])
-
-generated = gen.process('base.inp', 'com/mesonbuild/subbie.inp',
- preserve_path_from : meson.current_source_dir())
-
-e = executable('testprog', 'testprog.c', generated)
-test('testprog', e)
diff --git a/test cases/common/174 preserve gendir/testprog.c b/test cases/common/174 preserve gendir/testprog.c
deleted file mode 100644
index 46b4602..0000000
--- a/test cases/common/174 preserve gendir/testprog.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include"base.h"
-#include"com/mesonbuild/subbie.h"
-
-int main(int argc, char **argv) {
- return base() + subbie();
-}