From 9bcf92ef422999dca6c7fe00125c48065cbab977 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 8 Mar 2021 20:33:54 +0300 Subject: Use non-recursive wildcard in bdep-new-generated buildfiles when source directory is project/package root --- tests/new.testscript | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) (limited to 'tests/new.testscript') diff --git a/tests/new.testscript b/tests/new.testscript index 34a45e1..6fc0b93 100644 --- a/tests/new.testscript +++ b/tests/new.testscript @@ -331,7 +331,7 @@ status += -d prj EOE } - # Test create-from-existin functionality. + # Test create-from-existing functionality. # : exist : @@ -1133,6 +1133,100 @@ status += -d prj } } + : flat-layouts + : + : Here we test layouts where the source directory is the project/package + : root. Note that such layouts use non-recursive wildcards in buildfiles. + : + { + : exe + : + { + : basics + : + { + $* -l c++ -t exe,no-subdir hello 2>>/"EOE" &hello/***; + created new executable project hello in $~/hello/ + EOE + + mkdir hello/tests; + touch hello/tests/hello.test.cxx; + + $build hello/ $config_cxx 2>>~%EOE% + %(c\+\+|ld) .+%{2} + EOE + } + + : unit-tests + : + { + $* -l c++ -t exe,no-subdir,unit-tests hello 2>>/"EOE" &hello/***; + created new executable project hello in $~/hello/ + EOE + + mkdir hello/tests; + touch hello/tests/hello.test.cxx; + + $build hello/ $config_cxx 2>>~%EOE% + %(c\+\+|ld|ar) .+%{5} + EOE + } + } + + : lib + : + { + : basics + : + { + $* -l c++ -t lib,no-subdir,no-version,no-tests libhello 2>>/"EOE" &libhello/***; + created new library project libhello in $~/libhello/ + EOE + + mkdir libhello/tests; + touch libhello/tests/hello.test.cxx; + + $build libhello/ $config_cxx 2>>~%EOE% + %(c\+\+|ld|ar) .+%{4} + EOE + } + + : unit-tests + : + { + : binful + : + { + $* -l c++ -t lib,no-subdir,no-version,no-tests,unit-tests libhello 2>>/"EOE" &libhello/***; + created new library project libhello in $~/libhello/ + EOE + + mkdir libhello/tests; + touch libhello/tests/hello.test.cxx; + + $build libhello/ $config_cxx 2>>~%EOE% + %(c\+\+|ld|ar) .+%{8} + EOE + } + + : binless + : + { + $* -l c++ -t lib,no-subdir,no-version,no-tests,unit-tests,binless libhello 2>>/"EOE" &libhello/***; + created new library project libhello in $~/libhello/ + EOE + + mkdir libhello/tests; + touch libhello/tests/hello.test.cxx; + + $build libhello/ $config_cxx 2>>~%EOE% + %(c\+\+|ld) .+%{2} + EOE + } + } + } + } + : common-source-layouts : : Here we smoke test the common source code layouts listed in bdep-new(1). -- cgit v1.1