提交 d2760c7a 编写于 作者: C Cleber Rosa

avocado.Test: removal of srcdir

After the deprecation, comes the removal.  Hopefully, "workdir" is now
being used in tests by now.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 d449155f
......@@ -402,8 +402,7 @@ class Test(unittest.TestCase, TestData):
base_tmpdir = tempfile.mkdtemp(prefix="tmp_dir", dir=self.logdir)
self.__workdir = os.path.join(base_tmpdir,
self.name.str_filesystem)
self.__srcdir_warning_logged = False
self.__srcdir = utils_path.init_dir(self.__workdir, 'src')
utils_path.init_dir(self.__workdir)
self.log.debug("Test metadata:")
if self.filename:
......@@ -547,20 +546,6 @@ class Test(unittest.TestCase, TestData):
"""
return self.__workdir
@property
def srcdir(self):
"""
This property is deprecated and will be removed in the future.
The :meth:`workdir` property should be used instead.
"""
if not self.__srcdir_warning_logged:
LOG_JOB.warn("DEPRECATION NOTICE: the test's \"srcdir\" property "
"is deprecated and is planned to be removed no later "
"than May 11 2018. Please use the \"workdir\" "
"property instead.")
self.__srcdir_warning_logged = True
return self.__srcdir
@property
def cache_dirs(self):
"""
......@@ -977,7 +962,6 @@ class Test(unittest.TestCase, TestData):
os.environ['AVOCADO_TEST_OUTPUTDIR'] = self.outputdir
if self.__sysinfo_enabled:
os.environ['AVOCADO_TEST_SYSINFODIR'] = self.__sysinfodir
os.environ['AVOCADO_TEST_SRCDIR'] = self.__srcdir
def run_avocado(self):
"""
......
......@@ -1691,11 +1691,11 @@ tests:
+-----------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
| `***` | All variables from --mux-yaml | TIMEOUT=60; IO_WORKERS=10; VM_BYTES=512M; ... |
+-----------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
| AVOCADO_TEST_SRCDIR | Source directory for the test | /var/tmp/avocado_Bjr_rd/my-test.sh/src |
+-----------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
.. warning:: ``AVOCADO_TEST_SRCDIR`` is deprecated and will be removed
soon. Please use ``AVOCADO_TEST_WORKDIR`` instead.
.. warning:: ``AVOCADO_TEST_SRCDIR`` was present in earlier versions,
but has been deprecated on version 60.0, and removed on
version 62.0. Please use ``AVOCADO_TEST_WORKDIR``
instead.
SIMPLE Tests BASH extensions
......
......@@ -5,8 +5,6 @@ echo "Avocado Version: $AVOCADO_VERSION"
echo "Avocado Test basedir: $AVOCADO_TEST_BASEDIR"
echo "Avocado Test datadir: $AVOCADO_TEST_DATADIR"
echo "Avocado Test workdir: $AVOCADO_TEST_WORKDIR"
# Warning: srcdir is deprecated and will be removed soon
echo "Avocado Test srcdir: $AVOCADO_TEST_SRCDIR"
echo "Avocado Test logdir: $AVOCADO_TEST_LOGDIR"
echo "Avocado Test logfile: $AVOCADO_TEST_LOGFILE"
echo "Avocado Test outputdir: $AVOCADO_TEST_OUTPUTDIR"
......@@ -14,7 +12,6 @@ echo "Custom variable: $CUSTOM_VARIABLE"
test -d "$AVOCADO_TEST_BASEDIR" -a \
-d "$AVOCADO_TEST_WORKDIR" -a \
-d "$AVOCADO_TEST_SRCDIR" -a \
-d "$AVOCADO_TEST_LOGDIR" -a \
-f "$AVOCADO_TEST_LOGFILE" -a \
-d "$AVOCADO_TEST_OUTPUTDIR"
......@@ -28,7 +28,7 @@ class LinuxBuildTest(Test):
self.linux_build = kernel.KernelBuild(kernel_version,
linux_config,
self.srcdir,
self.workdir,
self.cache_dirs)
self.linux_build.download(kernel_src_url)
self.linux_build.uncompress()
......
......@@ -19,7 +19,6 @@ echo "Avocado Version: $AVOCADO_VERSION"
echo "Avocado Test basedir: $AVOCADO_TEST_BASEDIR"
echo "Avocado Test datadir: $AVOCADO_TEST_DATADIR"
echo "Avocado Test workdir: $AVOCADO_TEST_WORKDIR"
echo "Avocado Test srcdir: $AVOCADO_TEST_SRCDIR"
echo "Avocado Test logdir: $AVOCADO_TEST_LOGDIR"
echo "Avocado Test logfile: $AVOCADO_TEST_LOGFILE"
echo "Avocado Test outputdir: $AVOCADO_TEST_OUTPUTDIR"
......@@ -28,7 +27,6 @@ echo "Avocado Test sysinfodir: $AVOCADO_TEST_SYSINFODIR"
test "$AVOCADO_VERSION" = "{version}" -a \
-d "$AVOCADO_TEST_BASEDIR" -a \
-d "$AVOCADO_TEST_WORKDIR" -a \
-d "$AVOCADO_TEST_SRCDIR" -a \
-d "$AVOCADO_TEST_LOGDIR" -a \
-f "$AVOCADO_TEST_LOGFILE" -a \
-d "$AVOCADO_TEST_OUTPUTDIR" -a \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册