This is an automated email from the ASF dual-hosted git repository. jacksontj pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 5c6fc8ac260c3b0c0714ad021b3221e4f96c64cd Author: Thomas Jackson <[email protected]> AuthorDate: Mon Oct 31 20:56:17 2016 -0700 PoC TSQA running against existing builds --- ci/tsqa/tests/helpers.py | 24 +------------------ ci/tsqa/tests/test_buildoptions.py | 47 -------------------------------------- ci/tsqa/tests/test_example.py | 16 ++++--------- ci/tsqa/tests/test_regressions.py | 10 -------- 4 files changed, 5 insertions(+), 92 deletions(-) diff --git a/ci/tsqa/tests/helpers.py b/ci/tsqa/tests/helpers.py index af1104b..5bc45ce 100644 --- a/ci/tsqa/tests/helpers.py +++ b/ci/tsqa/tests/helpers.py @@ -32,29 +32,7 @@ def tests_file_path(path): return os.path.join(base, path) -class EnvironmentCase(tsqa.test_cases.EnvironmentCase): +class EnvironmentCase(tsqa.test_cases.CloneEnvironmentCase): ''' This class will get an environment (which is unique) but won't start it ''' - @classmethod - def getEnv(cls): - ''' - This function is responsible for returning an environment - ''' - SOURCE_DIR = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..')) - TMP_DIR = os.path.join(tempfile.gettempdir(), 'tsqa') - ef = tsqa.environment.EnvironmentFactory(SOURCE_DIR, - os.path.join(TMP_DIR, 'base_envs'), - default_configure={'enable-experimental-plugins': None, - 'enable-example-plugins': None, - 'enable-test-tools': None, - 'disable-dependency-tracking': None, - 'enable-ccache': None, - }, - ) - # TODO: figure out a way to determine why the build didn't fail and - # not skip all build failures? - try: - return ef.get_environment(cls.environment_factory.get('configure'), cls.environment_factory.get('env')) - except Exception as e: - raise unittest.SkipTest(e) diff --git a/ci/tsqa/tests/test_buildoptions.py b/ci/tsqa/tests/test_buildoptions.py deleted file mode 100644 index fd0f112..0000000 --- a/ci/tsqa/tests/test_buildoptions.py +++ /dev/null @@ -1,47 +0,0 @@ -''' -Test that configuration options successfully compile -''' - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -import helpers - -log = logging.getLogger(__name__) - - -class TestBuildOption(helpers.EnvironmentCase): - ''' - Run the built-in traffic_server regression test suite. - ''' - def test_buildoption(self): - pass - - -class TestBuildOptionFastSDK(TestBuildOption): - '''Build with --enable-fast-sdk''' - environment_factory = {'configure': {'enable-fast-sdk': None}} - - -class TestBuildOptionDisableDiags(TestBuildOption): - '''Build with --disable-diags''' - environment_factory = {'configure': {'disable-diags': None}} - - -class TestBuildOptionDisableTests(TestBuildOption): - '''Build with --disable-tests''' - environment_factory = {'configure': {'disable-tests': None}} diff --git a/ci/tsqa/tests/test_example.py b/ci/tsqa/tests/test_example.py index 2fcda64..3ba0cf0 100644 --- a/ci/tsqa/tests/test_example.py +++ b/ci/tsqa/tests/test_example.py @@ -37,14 +37,9 @@ class TestNoOp(helpers.EnvironmentCase): ''' This is purely a documentation test ''' - # you can set configure/environment options for the source build here - environment_factory = { - 'configure': { - 'enable-wccp': None, # A value of None means that the argument has no value - 'with-max-api-stats': 2048, # if there is a value it will be converted to --key=value - }, - 'env': None, - } + # you can set dependencies on specific "features" (according to traffic_layout) + # if the requirement isn't met the test is skipped + feature_requirements = {'TS_HAS_WCCP': 0} @classmethod def setUpClass(cls): @@ -86,10 +81,7 @@ class TestNoOp(helpers.EnvironmentCase): class TestConfigureFlags(helpers.EnvironmentCase): - environment_factory = { - 'configure': {'enable-wccp': None}, - } - + feature_requirements = {'TS_HAS_WCCP': 0} def test_wccp(self): self.assertTrue(True) diff --git a/ci/tsqa/tests/test_regressions.py b/ci/tsqa/tests/test_regressions.py index e49aa74..ba0b39f 100644 --- a/ci/tsqa/tests/test_regressions.py +++ b/ci/tsqa/tests/test_regressions.py @@ -51,13 +51,3 @@ class TestRegressions(helpers.EnvironmentCase): def test_regressions(self): cmd = [os.path.join(self.environment.layout.bindir, 'traffic_server'), '-R', '1'] tsqa.utils.run_sync_command(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - -class TestRegressionsLinuxNativeAIO(TestRegressions): - ''' - Run the built-in traffic_server regression test suite with - --enable-linux-native-aio. - ''' - environment_factory = { - 'configure': {'enable-linux-native-aio': None}, - } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
