Updated maintenance instructions, and removed all shell script.

[SVN r26423]
This commit is contained in:
John Maddock
2004-12-04 11:54:18 +00:00
parent 3423ec4c52
commit dacd302d49
3 changed files with 8 additions and 407 deletions

View File

@ -1376,13 +1376,13 @@ int test()
}
}</pre>
<p>Once the test code is in place, run the shell script "generate" that you will
find in the boost-root/libs/config/tools/ directory. This generates two .cpp
test files from the new test code, and adds the tests to the regression test
script, and the config_test.cpp test program. If you can't run shell scripts on
your platform then post a message on the boost mailing list, and someone will
run it for you. Finally add a new entry to config_info.cpp so that the new
macro gets printed out when that program is run.</p>
<p>
Once the test code is in place, build and run the program "generate.cpp" that
you will find in the boost-root/libs/config/tools/ directory. This generates
two .cpp test files from the new test code, and adds the tests to the
regression test Jamfile, and the config_test.cpp test program. Finally add a
new entry to config_info.cpp so that the new macro gets printed out when that
program is run.</p>
<h4><a name="feature_guidelines"></a>Adding New Feature Test Macros</h4>
<p>When you need to add a macro that describes a feature that the standard does
not require, follow the convention for adding a new defect macro (above), but

View File

@ -924,6 +924,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_INT64_T);
PRINT_MACRO(BOOST_NO_INTEGRAL_INT64_T);
PRINT_MACRO(BOOST_NO_INTRINSIC_WCHAR_T);
PRINT_MACRO(BOOST_NO_IS_ABSTRACT);
PRINT_MACRO(BOOST_NO_LIMITS);
PRINT_MACRO(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS);
PRINT_MACRO(BOOST_NO_LONG_LONG_NUMERIC_LIMITS);

View File

@ -1,400 +0,0 @@
#!/bin/sh
# (C) Copyright John Maddock 2001 - 2003.
# Use, modification and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
#get date:
date_string=`date`
# init config file:
cat > ../test/regression.cfg << EOF
//
// regression test script for boost configuration setup
//
run libs/config/test/config_info.cpp
run libs/config/test/config_test.cpp
run libs/config/test/limits_test.cpp
compile-fail threads/test_thread_fail1.cpp ;
compile-fail threads/test_thread_fail2.cpp ;
EOF
cat > ../test/Jamfile << EOF
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on $date_string,
# by libs/config/tools/generate
# Copyright John Maddock.
#
# If you need to alter build preferences then set them in
# the template defined in options.jam.
#
subproject libs/config/test ;
# bring in the rules for testing
import testing ./options ;
run config_info.cpp <template>config_options ;
run config_test.cpp <template>config_options ;
run limits_test.cpp <template>config_test_options ;
run abi/abi_test.cpp abi/main.cpp <template>config_options ;
EOF
# init main config test file:
cat > ../test/config_test.cpp << EOF
// This file was automatically generated on $date_string,
// by libs/config/tools/generate
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
// Test file for config setup
// This file should compile, if it does not then
// one or more macros need to be defined.
// see boost_*.ipp for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_*.ipp on
// $date_string
#include <boost/config.hpp>
#include <iostream>
#include "test.hpp"
int error_count = 0;
EOF
all_no=""
all_has=""
#
# enumerate through the boost_no* test files:
#
for file in ../test/boost_no_*.ipp; do
basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'`
macroname=`cat $file | grep '^//[ ]*MACRO:' | sed 's/.*MACRO:[ ]*\([_A-Z0-9]*\).*/\1/'`
title=`cat $file | grep '^//[ ]*TITLE:' | sed 's/.*TITLE:[ ]*\([^ ].*\)/\1/'`
namespace=`echo $macroname | tr [:upper:] [:lower:]`
echo "Processing $file..."
echo
echo "Basename: $basename"
echo "Macro: $macroname"
echo "Title: $title"
echo "Namespace: $namespace"
# now create positive test file:
if test -f "../test/$basename""_pass.cpp"; then
echo "skipping file ../test/$basename""_pass.cpp"
else
echo "generating file ../test/$basename""_pass.cpp"
cat > "../test/$basename""_pass.cpp" << EOF
// This file was automatically generated on $date_string,
// by libs/config/tools/generate
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
// Test file for macro $macroname
// This file should compile, if it does not then
// $macroname needs to be defined.
// see boost_$basename.ipp for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_$basename.ipp on
// $date_string
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifndef $macroname
#include "boost_$basename.ipp"
#else
namespace ${namespace} = empty_boost;
#endif
int main( int, char *[] )
{
return ${namespace}::test();
}
EOF
fi
# now create negative test file:
if test -f "../test/$basename""_fail.cpp"; then
echo "skipping file ../test/$basename""_fail.cpp"
else
echo "generating file ../test/$basename""_fail.cpp"
cat > "../test/$basename""_fail.cpp" << EOF
// This file was automatically generated on $date_string,
// by libs/config/tools/generate
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
// Test file for macro $macroname
// This file should not compile, if it does then
// $macroname need not be defined.
// see boost_$basename.ipp for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_$basename.ipp on
// $date_string
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifdef $macroname
#include "boost_$basename.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return ${namespace}::test();
}
EOF
fi
# now append to config_test.cpp:
cat >> "../test/config_test.cpp" << EOF
#ifndef $macroname
#include "boost_$basename.ipp"
#else
namespace ${namespace} = empty_boost;
#endif
EOF
all_no="$namespace $all_no"
# output regression tests:
echo "run libs/config/test/$basename""_pass.cpp" >> ../test/regression.cfg
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
echo "[ run $basename""_pass.cpp <template>config_options ]" >> ../test/Jamfile
echo "[ compile-fail $basename""_fail.cpp <template>config_options ] ;" >> ../test/Jamfile
done
#
# enumerate through the boost_has* test files:
#
for file in ../test/boost_has_*.ipp; do
basename=`echo $file | sed 's/.*boost_\(.*\)\.ipp/\1/'`
macroname=`cat $file | grep '^//[ ]*MACRO:' | sed 's/.*MACRO:[ ]*\([_A-Z0-9]*\).*/\1/'`
title=`cat $file | grep '^//[ ]*TITLE:' | sed 's/.*TITLE:[ ]*\([^ ].*\)/\1/'`
namespace=`echo $macroname | tr [:upper:] [:lower:]`
# echo $basename
echo
echo "processing $macroname ..."
# echo $title
# echo $namespace
# now create positive test file:
if test -f "../test/$basename""_pass.cpp"; then
echo "skipping file ../test/$basename""_pass.cpp"
else
echo "generating file ../test/$basename""_pass.cpp"
cat > "../test/$basename""_pass.cpp" << EOF
// This file was automatically generated on $date_string,
// by libs/config/tools/generate
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
// Test file for macro $macroname
// This file should compile, if it does not then
// $macroname should not be defined.
// see boost_$basename.ipp for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_$basename.ipp on
// $date_string
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifdef $macroname
#include "boost_$basename.ipp"
#else
namespace ${namespace} = empty_boost;
#endif
int main( int, char *[] )
{
return ${namespace}::test();
}
EOF
fi
# now create negative test file:
if test -f "../test/$basename""_fail.cpp"; then
echo skipping file "../test/$basename""_fail.cpp"
else
echo generating file "../test/$basename""_fail.cpp"
cat > "../test/$basename""_fail.cpp" << EOF
// This file was automatically generated on $date_string,
// by libs/config/tools/generate
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.
// Test file for macro $macroname
// This file should not compile, if it does then
// $macroname may be defined.
// see boost_$basename.ipp for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_$basename.ipp on
// $date_string
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include "test.hpp"
#ifndef $macroname
#include "boost_$basename.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return ${namespace}::test();
}
EOF
fi
# now append to config_test.cpp:
cat >> "../test/config_test.cpp" << EOF
#ifdef $macroname
#include "boost_$basename.ipp"
#else
namespace ${namespace} = empty_boost;
#endif
EOF
all_has="$namespace $all_has"
# output regression tests:
echo "run libs/config/test/$basename""_pass.cpp" >> ../test/regression.cfg
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
echo "[ run $basename""_pass.cpp <template>config_options ]" >> ../test/Jamfile
echo "[ compile-fail $basename""_fail.cpp <template>config_options ] ;" >> ../test/Jamfile
done
#
# finish off config_test.cpp:
#
echo generating "../test/config_test.cpp"
cat >> "../test/config_test.cpp" << EOF
int main( int, char *[] )
{
EOF
for macro in $all_no; do
cat >> "../test/config_test.cpp" << EOF
if(0 != ${macro}::test())
{
std::cerr << "Failed test for $macroname at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
EOF
done
for macro in $all_has; do
cat >> "../test/config_test.cpp" << EOF
if(0 != ${macro}::test())
{
std::cerr << "Failed test for $macroname at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
EOF
done
cat >> "../test/config_test.cpp" << EOF
return error_count;
}
EOF
#rm -f ../config.*
echo "updating configure script..."
autoconf ../tools/configure.in > ../configure
echo