[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6053] Add a '--distribution' flag for use in future test
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6053] Add a '--distribution' flag for use in future test revisions |
Date: |
Mon, 08 Dec 2014 00:48:22 +0000 |
Revision: 6053
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6053
Author: chicares
Date: 2014-12-08 00:48:21 +0000 (Mon, 08 Dec 2014)
Log Message:
-----------
Add a '--distribution' flag for use in future test revisions
Modified Paths:
--------------
lmi/trunk/main_wx_test.cpp
lmi/trunk/wx_test_case.hpp
Modified: lmi/trunk/main_wx_test.cpp
===================================================================
--- lmi/trunk/main_wx_test.cpp 2014-12-07 01:57:16 UTC (rev 6052)
+++ lmi/trunk/main_wx_test.cpp 2014-12-08 00:48:21 UTC (rev 6053)
@@ -176,6 +176,9 @@
// Used by tests to retrieve their configuration parameters.
wxConfigBase const& get_config_for(char const* name);
+ // Used to check if distribution tests should be enabled.
+ bool is_distribution_test() const { return is_distribution_test_; }
+
private:
application_test();
@@ -228,10 +231,13 @@
boost::scoped_ptr<wxFileConfig> config_;
bool run_all_;
+
+ bool is_distribution_test_;
};
application_test::application_test()
:run_all_(true)
+ ,is_distribution_test_(false)
{
}
@@ -327,6 +333,11 @@
last_test_option = arg;
remove_arg(n, argc, argv);
}
+ else if(0 == std::strcmp(arg, "--distribution"))
+ {
+ is_distribution_test_ = true;
+ remove_arg(n, argc, argv);
+ }
else if
(
0 == std::strcmp(arg, "-h")
@@ -340,10 +351,11 @@
"Usage: "
<< argv[0]
<< "\n"
- " -h,\t--help \tdisplay this help and exit\n"
- " -l,\t--list \tlist all available tests and exit\n"
- " -t <name> or \trun only the specified test (may occur\n"
- " --test <name>\tmultiple times); default: run all tests\n"
+ " -h,\t--help \tdisplay this help and exit\n"
+ " -l,\t--list \tlist all available tests and exit\n"
+ " -t <name> or \trun only the specified test (may
occur\n"
+ " --test <name> \tmultiple times); default: run all
tests\n"
+ " --distribution \tenable distribution-specific tests\n"
"\n"
"Additionally, all command line options supported by the\n"
"main lmi executable are also supported."
@@ -495,6 +507,11 @@
}
}
+bool wx_base_test_case::is_distribution_test() const
+{
+ return application_test::instance().is_distribution_test();
+}
+
// Application to drive the tests
class SkeletonTest : public Skeleton
{
Modified: lmi/trunk/wx_test_case.hpp
===================================================================
--- lmi/trunk/wx_test_case.hpp 2014-12-07 01:57:16 UTC (rev 6052)
+++ lmi/trunk/wx_test_case.hpp 2014-12-08 00:48:21 UTC (rev 6053)
@@ -65,6 +65,12 @@
/// Throws test_skipped_exception if the file is not supported.
void skip_if_not_supported(char const* file);
+ /// Return true if running in distribution testing mode.
+ ///
+ /// This method is used to restrict execution of the tests that are
+ /// specific to the binary program distribution.
+ bool is_distribution_test() const;
+
protected:
/// The argument must be a literal, as we just store the pointer.
explicit wx_base_test_case(char const* name);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6053] Add a '--distribution' flag for use in future test revisions,
Greg Chicares <=