From 0904d5bfe683195ad2a5d99ccd6fbe4a0f132183 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sat, 27 May 2023 11:54:38 -0600 Subject: Tweak test MSVC/MSVC_BATCH-spaces-targetdir.py Test did not have an ending test.pass_test(), so it was not actually *recorded* as a pass, though it was passing. Renamed fixture dir. Signed-off-by: Mats Wichmann --- CHANGES.txt | 5 +++++ test/MSVC/MSVC_BATCH-spaces-fixture/SConstruct | 15 +++++++++++++++ test/MSVC/MSVC_BATCH-spaces-fixture/sconstest.skip | 0 test/MSVC/MSVC_BATCH-spaces-fixture/src/a.c | 19 +++++++++++++++++++ test/MSVC/MSVC_BATCH-spaces-fixture/src/b.c | 9 +++++++++ test/MSVC/MSVC_BATCH-spaces-fixture/src/c.c | 9 +++++++++ test/MSVC/MSVC_BATCH-spaces-targetdir.py | 13 +++++++++++-- test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct | 15 --------------- test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c | 19 ------------------- test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c | 9 --------- test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c | 9 --------- 11 files changed, 68 insertions(+), 54 deletions(-) create mode 100644 test/MSVC/MSVC_BATCH-spaces-fixture/SConstruct create mode 100644 test/MSVC/MSVC_BATCH-spaces-fixture/sconstest.skip create mode 100644 test/MSVC/MSVC_BATCH-spaces-fixture/src/a.c create mode 100644 test/MSVC/MSVC_BATCH-spaces-fixture/src/b.c create mode 100644 test/MSVC/MSVC_BATCH-spaces-fixture/src/c.c delete mode 100644 test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct delete mode 100644 test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c delete mode 100644 test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c delete mode 100644 test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c diff --git a/CHANGES.txt b/CHANGES.txt index 56f9d1b..2584583 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -59,6 +59,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER The methods are depends_on (base functionality removed in 2005) and is_pseudeo_derived (base functionality removed in 2006). There may well be more! + - Added pass_test() call to test/MSVC/MSVC_BATCH-spaces-targetdir.py. + It looked it was missing a more detailed check, but it should be + sufficient just to check the build worked. Renamed the fixture + dir to follow naming convention in test/MSVC overall, and added + a sconstest.skip file, also to follow convention. RELEASE 4.5.2 - Sun, 21 Mar 2023 14:08:29 -0700 diff --git a/test/MSVC/MSVC_BATCH-spaces-fixture/SConstruct b/test/MSVC/MSVC_BATCH-spaces-fixture/SConstruct new file mode 100644 index 0000000..025f9ee --- /dev/null +++ b/test/MSVC/MSVC_BATCH-spaces-fixture/SConstruct @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +import os.path + +DefaultEnvironment(tools=[]) +env = Environment(MSVC_BATCH=True) + +td = 'tar ge tdir' +VariantDir(td, 'src') +env.Program( + os.path.join(td, 'test_program'), + [os.path.join(td, a) for a in ['a.c', 'b.c', 'c.c']], +) diff --git a/test/MSVC/MSVC_BATCH-spaces-fixture/sconstest.skip b/test/MSVC/MSVC_BATCH-spaces-fixture/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/MSVC/MSVC_BATCH-spaces-fixture/src/a.c b/test/MSVC/MSVC_BATCH-spaces-fixture/src/a.c new file mode 100644 index 0000000..9164729 --- /dev/null +++ b/test/MSVC/MSVC_BATCH-spaces-fixture/src/a.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + +#include + +extern void myfuncb(); +extern void myfuncc(); + + +void myfunca() { + printf("myfunca\n"); +} + +int main(int argc, char *argv[]) { + myfunca(); + myfuncb(); + myfuncc(); +} diff --git a/test/MSVC/MSVC_BATCH-spaces-fixture/src/b.c b/test/MSVC/MSVC_BATCH-spaces-fixture/src/b.c new file mode 100644 index 0000000..51e92dd --- /dev/null +++ b/test/MSVC/MSVC_BATCH-spaces-fixture/src/b.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + +#include + +void myfuncb() { + printf("myfuncb\n"); +} diff --git a/test/MSVC/MSVC_BATCH-spaces-fixture/src/c.c b/test/MSVC/MSVC_BATCH-spaces-fixture/src/c.c new file mode 100644 index 0000000..fe9f203 --- /dev/null +++ b/test/MSVC/MSVC_BATCH-spaces-fixture/src/c.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + +#include + +void myfuncc() { + printf("myfuncc\n"); +} diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir.py b/test/MSVC/MSVC_BATCH-spaces-targetdir.py index 9b11872..98cde3f 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir.py +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir.py @@ -2,10 +2,19 @@ # # Copyright The SCons Foundation +"""Test that spaces in the target dir name doesn't break MSVC_BATCH.""" + import TestSCons test = TestSCons.TestSCons() test.skip_if_not_msvc() -test.dir_fixture('MSVC_BATCH-spaces-targetdir') -test.run() +test.dir_fixture('MSVC_BATCH-spaces-fixture') +test.run(stderr=None) # it's enough that the build didn't fail +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4 diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct b/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct deleted file mode 100644 index 025f9ee..0000000 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright The SCons Foundation - -import os.path - -DefaultEnvironment(tools=[]) -env = Environment(MSVC_BATCH=True) - -td = 'tar ge tdir' -VariantDir(td, 'src') -env.Program( - os.path.join(td, 'test_program'), - [os.path.join(td, a) for a in ['a.c', 'b.c', 'c.c']], -) diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c deleted file mode 100644 index 9164729..0000000 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// Copyright The SCons Foundation - -#include - -extern void myfuncb(); -extern void myfuncc(); - - -void myfunca() { - printf("myfunca\n"); -} - -int main(int argc, char *argv[]) { - myfunca(); - myfuncb(); - myfuncc(); -} diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c deleted file mode 100644 index 51e92dd..0000000 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// Copyright The SCons Foundation - -#include - -void myfuncb() { - printf("myfuncb\n"); -} diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c deleted file mode 100644 index fe9f203..0000000 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// Copyright The SCons Foundation - -#include - -void myfuncc() { - printf("myfuncc\n"); -} -- cgit v0.12