*.cc: Remove explicit reference to 'testsuite/' in testcases.
authorGabriel Dos Reis <gdr@codesourcery.com>
Thu, 25 Jan 2001 04:09:22 +0000 (04:09 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Thu, 25 Jan 2001 04:09:22 +0000 (04:09 +0000)
       * testsuite/27_io/*.cc: Remove explicit reference to 'testsuite/'
       in testcases.  Prepare for the DejaGnu based framework.
       * mkcheck.in: Adjust call to tests_flags.  Don't mmkdir testsuite
       directory -- it is now mkcheck working directory.
       * tests_flags.in: Remove reference to $(top_srcdir).  Use
       ${SRC_DIR} instead.
       * Makefile.am (check, check-install): Change mkcheck invocation
       logic.
       * Makefile.in: Regenerate.

From-SVN: r39255

16 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.am
libstdc++-v3/Makefile.in
libstdc++-v3/mkcheck.in
libstdc++-v3/tests_flags.in
libstdc++-v3/testsuite/27_io/filebuf.cc
libstdc++-v3/testsuite/27_io/filebuf_members.cc
libstdc++-v3/testsuite/27_io/ifstream_members.cc
libstdc++-v3/testsuite/27_io/ios_base_members_static.cc
libstdc++-v3/testsuite/27_io/istream_extractor_other.cc
libstdc++-v3/testsuite/27_io/istream_seeks.cc
libstdc++-v3/testsuite/27_io/istream_unformatted.cc
libstdc++-v3/testsuite/27_io/ofstream_members.cc
libstdc++-v3/testsuite/27_io/ostream_inserter_char.cc
libstdc++-v3/testsuite/27_io/ostream_inserter_other.cc
libstdc++-v3/testsuite/27_io/ostream_seeks.cc

index fdd1cff456635032b79ab624e21a4b5d0750a514..cdd518c4e462e988c95612171832d8ec328f02fe 100644 (file)
@@ -1,3 +1,15 @@
+2001-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
+
+       * testsuite/27_io/*.cc: Remove explicit reference to 'testsuite/'
+       in testcases.  Prepare for the DejaGnu based framework.
+       * mkcheck.in: Adjust call to tests_flags.  Don't mmkdir testsuite
+       directory -- it is now mkcheck working directory.
+       * tests_flags.in: Remove reference to $(top_srcdir).  Use
+       ${SRC_DIR} instead.
+       * Makefile.am (check, check-install): Change mkcheck invocation
+       logic. 
+       * Makefile.in: Regenerate.
+
 2001-01-24  Mark Mitchell  <mark@codesourcery.com>
 
        * config/os/aix/bits/atomicity.h (__compare_and_swap): Remove.
index 0c5c09f2b549a51af3a58962895f9ee2a79e8d2c..aab3dc155b3f0a368cacbced2880251c0cd87d33 100644 (file)
@@ -26,17 +26,21 @@ MAINT_CHARSET = latin1
 
 SUBDIRS = libio libmath libsupc++ src
 
-
-# Use $(blddir) instead of $(top_builddir) for arguments to "mkcheck"
+# Use $${builddir} instead of $(top_builddir) for arguments to "mkcheck"
 # because then the paths will be full pathnames, not relative
 # pathnames. (-Wl,--rpath seems to like this better.)
-check:  $(top_builddir)/mkcheck
-       chmod +x  $(top_builddir)/mkcheck
-       $(top_builddir)/mkcheck 0 `pwd` $(top_srcdir)
+check: $(top_builddir)/mkcheck
+       -(chmod + $(top_builddir)/mkcheck; \
+         srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
+         test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
+         cd testsuite; $${builddir}/mkcheck 0 $${builddir} $${srcdir})
 
 check-install: $(top_builddir)/mkcheck
-       chmod +x  $(top_builddir)/mkcheck
-       $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
+       -(chmod + $(top_builddir)/mkcheck; \
+         srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
+         test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
+         cd testsuite; \
+         $${builddir}/mkcheck 1 $${builddir} $${srcdir} $(prefix))
 
 # Multilib support.
 MAKEOVERRIDES=
index 8402499faccea19462f2b7646bb69ebb536169e1..9a45cacc882ef43128761d3efefd7e85c0568a88 100644 (file)
@@ -410,16 +410,21 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
-# Use $(blddir) instead of $(top_builddir) for arguments to "mkcheck"
+# Use $${builddir} instead of $(top_builddir) for arguments to "mkcheck"
 # because then the paths will be full pathnames, not relative
 # pathnames. (-Wl,--rpath seems to like this better.)
-check:  $(top_builddir)/mkcheck
-       chmod +x  $(top_builddir)/mkcheck
-       $(top_builddir)/mkcheck 0 `pwd` $(top_srcdir)
+check: $(top_builddir)/mkcheck
+       -(chmod + $(top_builddir)/mkcheck; \
+         srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
+         test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
+         cd testsuite; $${builddir}/mkcheck 0 $${builddir} $${srcdir})
 
 check-install: $(top_builddir)/mkcheck
-       chmod +x  $(top_builddir)/mkcheck
-       $(top_builddir)/mkcheck 1 `pwd` $(top_srcdir) $(prefix)
+       -(chmod + $(top_builddir)/mkcheck; \
+         srcdir=`cd $(top_srcdir); pwd`; builddir=`pwd`; \
+         test -d testsuite || (mkdir testsuite; chmod u+w testsuite); \
+         cd testsuite; \
+         $${builddir}/mkcheck 1 $${builddir} $${srcdir} $(prefix))
 
 # Multilib Makefile bits.
 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
index 6b5ae31cc08ced4cd9b4b225290baa53ae6a26d8..7eb30e014c8d1c7bde0d3b7ed44865075d325a5b 100755 (executable)
@@ -52,7 +52,7 @@ esac
 # Compute the flags necessary to run the testsuite.
 saved_ifs=$IFS
 IFS=':'
-set `./tests_flags ${query} $*` || exit 1
+set `../tests_flags ${query} $*` || exit 1
 BUILD_DIR=$1; SRC_DIR=$2; PREFIX_DIR=$3; CXX=$4; CXXFLAGS=$5; INCLUDES=$6; LIBS=$7;
 IFS=$saved_ifs
 
@@ -74,12 +74,10 @@ ST_FLAG="-static"
 
 # Set up the testing directory, which should be in a directory called
 # "testsuite" in the root level of the build directory.
-TEST_DIR="`pwd`/testsuite"
-if [ ! -d "$TEST_DIR" ]; then
-    echo "making directory $TEST_DIR"
-    mkdir $TEST_DIR
-    mkdir $TEST_DIR/.libs    # help libtool keep quiet
-    chmod u+w $TEST_DIR
+TEST_DIR='.'
+# help libtool keep quiet
+if [ ! -d ${TEST_DIR}/.libs ]; then
+    mkdir $TEST_DIR/.libs    
 fi
 
 # the name of the file that will collect and hold all this useful data:
index b82fe567c05baf5c2df7e83eeed6d7cbd8212117..c012cbb097fd4efc060ffad365b4374114a47126 100644 (file)
@@ -98,7 +98,6 @@ esac
 
 # Compute include paths
 # INCLUDES == include path to new headers for use on gcc command-line
-top_srcdir=@top_srcdir@
 C_DIR="`basename  @C_INCLUDE_DIR@`"
 case ${query} in
     --installed-library)
@@ -121,7 +120,7 @@ case ${query} in
 esac
 
 # For built or installed libraries, we need to get right OS-specific bits.
-. ${top_srcdir}/configure.target
+. ${SRC_DIR}/configure.target
 
 # LIB_PATH == where to find the build libraries for libtool's use
 # CXX == the full pathname of the compiler
index bba2fbd60344b49fe6d843f27673bf76e835f8fb..4cfd9277b57467ab2a31a1afd35541e37fe5c778 100644 (file)
 // buffer_size length of 8092, so that overflow/underflow can be
 // simulated a bit more readily.
 
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %*.txt
+
 #include <fstream>
 #include <debug_assert.h>
 
 const char carray_01[] = "santa cruz or sandiego?";
 const char carray_02[] = "memphis, new orleans, and savanah";
-const char name_01[] = "testsuite/filebuf-1.txt"; // file with data in it
-const char name_02[] = "testsuite/filebuf-2.txt"; // empty file, need to create
-const char name_03[] = "testsuite/filebuf-3.txt"; // empty file, need to create
+const char name_01[] = "filebuf-1.txt"; // file with data in it
+const char name_02[] = "filebuf-2.txt"; // empty file, need to create
+const char name_03[] = "filebuf-3.txt"; // empty file, need to create
 
 class derived_filebuf: public std::filebuf
 {
index beaf6da6600b5c3819a8a42788ce7827ae304305..3b028a5221a2825f84b8400ad579d490c89f0ee4 100644 (file)
@@ -17,6 +17,8 @@
 // USA.
 
 // 27.8.1.3 filebuf member functions
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %-*.txt
 
 // various tests for filebuf::open() and filebuf::close() including
 // the non-portable functionality in the libstdc++-v3 IO library
@@ -37,8 +39,8 @@
 // thanks to "George T. Talbot" <george@moberg.com> for uncovering
 // this bug/situation. 
 
-const char name_01[] = "testsuite/filebuf_members-1.tst";
-const char name_02[] = "testsuite/filebuf_members-1.txt";
+const char name_01[] = "filebuf_members-1.tst";
+const char name_02[] = "filebuf_members-1.txt";
 
 int
 test_01()
index e87aa76016a3c4cf97edeae2a465d43c07c8969c..3fb7a6d1156abc3832b87fe02278556904c32b00 100644 (file)
 // USA.
 
 // 27.8.1.7 ifstream member functions
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %-*.txt
 
 #include <istream>
 #include <fstream>
 #include <debug_assert.h>
 
-const char name_01[] = "testsuite/ifstream_members-1.tst";
-const char name_02[] = "testsuite/ifstream_members-1.txt";
+const char name_01[] = "ifstream_members-1.tst";
+const char name_02[] = "ifstream_members-1.txt";
 
 // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html
 bool test00()
index 6a0e82684b4bb30f6a5497fab88d28855476051a..08043449bdcddbc88b8d3579f8e9371e3cad93e4 100644 (file)
@@ -21,6 +21,8 @@
 // USA.
 
 // 27.4.2.4 ios_base static members
+// @require@ %-*.tst
+// @diff@ %-*.tst %-*.txt
 
 #include <cstdio>
 #include <sstream>
@@ -58,7 +60,7 @@ test02()
 {
   std::ios_base::sync_with_stdio();
  
-  std::freopen("testsuite/ios_base_members_static-1.txt", "w", stdout);
+  std::freopen("ios_base_members_static-1.txt", "w", stdout);
  
   for (int i = 0; i < 2; i++)
     {
index 72633af6ddd4b0e4804b6a4f2a927a30f19bbbe6..2bd878fabce7598278520066293f501a4d8a7547 100644 (file)
@@ -19,6 +19,8 @@
 // USA.
 
 // 27.6.1.2.3 basic_istream::operator>>
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %-*.txt
 
 #include <istream>
 #include <sstream>
@@ -154,8 +156,8 @@ bool test02() {
 
   bool test = true;
   typedef std::ios::traits_type ctraits_type;
-  const char name_01[] = "testsuite/istream_extractor_other-1.txt"; //read 
-  const char name_02[] = "testsuite/istream_extractor_other-2.txt"; //write
+  const char name_01[] = "istream_extractor_other-1.txt"; //read 
+  const char name_02[] = "istream_extractor_other-2.txt"; //write
 
   std::filebuf fbin, fbout;
   fbin.open(name_01, std::ios_base::in);
index cc2626dfcd1b7b4375f61f225d6e26ce99ca7163..d5fad458af032b845491cb4d977e8b6ad782d01c 100644 (file)
@@ -33,7 +33,7 @@ bool test01()
   typedef ios::pos_type pos_type;
 
   bool test = true;
-  const char str_lit01[] = "testsuite/istream_unformatted-1.tst";
+  const char str_lit01[] = "istream_unformatted-1.tst";
 
   // in
   // test default ctors leave things in the same positions...
@@ -68,8 +68,8 @@ void test04(void)
   bool test = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
-  const char str_lit01[] = "testsuite/istream_unformatted-1.txt";
-  const char str_lit02[] = "testsuite/istream_unformatted-2.txt";
+  const char str_lit01[] = "istream_unformatted-1.txt";
+  const char str_lit02[] = "istream_unformatted-2.txt";
   std::ifstream if01(str_lit01, std::ios_base::in | std::ios_base::out);
   std::ifstream if02(str_lit01, std::ios_base::in);
   std::ifstream if03(str_lit02, std::ios_base::out | std::ios_base::trunc); 
@@ -174,7 +174,7 @@ void test05(void)
   bool test = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
-  const char str_lit01[] = "testsuite/istream_unformatted-1.tst";
+  const char str_lit01[] = "istream_unformatted-1.tst";
   std::ifstream if01(str_lit01);
   std::ifstream if02(str_lit01);
   std::ifstream if03(str_lit01);
index 76464d73ffa5e8d323a0de8dff5d45009e18d043..77560a5909532a8debbab391369b38c1de69a275 100644 (file)
@@ -19,6 +19,8 @@
 // USA.
 
 // 27.6.1.3 unformatted input functions
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %-*.txt
 
 #include <cstring> // for strncmp,...
 #include <istream>
@@ -459,7 +461,7 @@ int
 test07()
 {
   bool test = true;
-  const char* tfn = "testsuite/istream_unformatted-3.txt";
+  const char* tfn = "istream_unformatted-3.txt";
   std::ifstream infile;
   infile.open(tfn);
   VERIFY( !(!infile) );
index 4a20d2f57516aedbe8736ec01a344d17e49c05e8..d965b3efbfc83bcc5345021da3be789292e5d372 100644 (file)
 // USA.
 
 // 27.8.1.10 ofstream member functions
+// @require@ %-*.tst
+// @diff@ %-*.tst %-*.txt
 
 #include <ostream>
 #include <fstream>
 #include <debug_assert.h>
 
-const char name_01[] = "testsuite/ofstream_members-1.tst";
-const char name_02[] = "testsuite/ofstream_members-1.txt";
+const char name_01[] = "ofstream_members-1.tst";
+const char name_02[] = "ofstream_members-1.txt";
 
 // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html
 bool test00()
index 59a1bd27e74557746d01e3ee20d720bab96841b4..0c7f18915fc5a52a7963022ba6edb6c806f090ca 100644 (file)
@@ -32,7 +32,7 @@ bool test01()
   bool test = true;
   std::string str01;
   const int size = 1000;
-  const char name_02[] = "testsuite/ostream_inserter_char-1.txt";
+  const char name_02[] = "ostream_inserter_char-1.txt";
 
   // initialize string
   for(int i=0 ; i < size; i++) {
index 465890e21091e8076f327df748bee2f21364fb2c..ec3a028e82f6552f7303aa250bdcab114274bf57 100644 (file)
@@ -20,6 +20,8 @@
 // USA.
 
 // 27.6.2.5.4 basic_ostream character inserters
+// @require@ %-*.tst %-*.txt
+// @diff@ %-*.tst %-*.txt
 
 #include <ostream>
 #include <sstream>
 #include <debug_assert.h>
 
 const int size = 1000;
-const char name_01[] = "testsuite/ostream_inserter_other-1.tst";
-const char name_02[] = "testsuite/ostream_inserter_other-1.txt";
-const char name_03[] = "testsuite/ostream_inserter_other-2.tst";
-const char name_04[] = "testsuite/ostream_inserter_other-2.txt";
+const char name_01[] = "ostream_inserter_other-1.tst";
+const char name_02[] = "ostream_inserter_other-1.txt";
+const char name_03[] = "ostream_inserter_other-2.tst";
+const char name_04[] = "ostream_inserter_other-2.txt";
 
 
 // stringstream
@@ -101,8 +103,8 @@ test03(void)
 
   typedef ios::pos_type        pos_type;
 
-  const char* TEST_IN = "testsuite/ostream_inserter_other_in";
-  const char* TEST_OUT = "testsuite/ostream_inserter_other_out";
+  const char* TEST_IN = "ostream_inserter_other_in";
+  const char* TEST_OUT = "ostream_inserter_other_out";
   pos_type i_read, i_wrote, rs, ws;
   double tf_size = BUFSIZ * 2.5;
   ofstream testfile(TEST_IN);
index 0d66754f9d2c8ba774fa282d256e11b7feecc75c..df927562a2ba1f47fee293bf0a2ccb9c6372e71d 100644 (file)
@@ -32,7 +32,7 @@ bool test01()
   typedef ios::pos_type pos_type;
 
   bool test = true;
-  const char str_lit01[] = "testsuite/ostream_seeks-1.txt";
+  const char str_lit01[] = "ostream_seeks-1.txt";
 
   // out
   // test default ctors leave things in the same positions...
@@ -72,8 +72,8 @@ void test04(void)
   bool test = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
-  const char str_lit01[] = "testsuite/istream_unformatted-1.txt";
-  const char str_lit02[] = "testsuite/istream_unformatted-2.txt";
+  const char str_lit01[] = "istream_unformatted-1.txt";
+  const char str_lit02[] = "istream_unformatted-2.txt";
   std::ifstream if01(str_lit01, std::ios_base::in | std::ios_base::out);
   std::ifstream if02(str_lit01, std::ios_base::in);
   std::ifstream if03(str_lit02, std::ios_base::out | std::ios_base::trunc); 
@@ -178,7 +178,7 @@ void test05(void)
   bool test = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
-  const char str_lit01[] = "testsuite/istream_unformatted-1.tst";
+  const char str_lit01[] = "istream_unformatted-1.tst";
   std::ifstream if01(str_lit01);
   std::ifstream if02(str_lit01);
   std::ifstream if03(str_lit01);