Remove unnesessary fix for testr
As far community replace testr on stestr in tempest 18
we should remove fix for testr skip mechanism and replace in
run-tempest.sh call of testr on stestr
Change-Id: I0864da097e29273142393ba55f88c1346c222573
Related-Prod: PROD-22874 PROD-23315
diff --git a/.gitreview b/.gitreview
index d6d293e..4c67617 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,6 @@
[gerrit]
-host=172.16.48.254
+host=gerrit.mcp.mirantis.net
port=29418
project=mcp/docker-ci-tempest.git
+defaultbranch=queens
+
diff --git a/Dockerfile b/Dockerfile
index 98bc990..980b7c5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -87,11 +87,6 @@
COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
-# Patch os_testr library to fix issue ralated with tempest black-list option
-COPY bin/patches/regex_builder.patch /tmp/regex_builder.patch
-#TODO: investigate how to add skiplist without os-testr
-#RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /tmp/regex_builder.patch
-
# Cleanup.
RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
diff --git a/bin/patches/regex_builder.patch b/bin/patches/regex_builder.patch
deleted file mode 100644
index b29bf4a..0000000
--- a/bin/patches/regex_builder.patch
+++ /dev/null
@@ -1,77 +0,0 @@
---- os_testr/regex_builder.py 2018-04-25 11:33:36.330640993 +0300
-+++ os_testr/regex_builder.py 2018-04-25 11:33:54.878627168 +0300
-@@ -71,34 +71,46 @@
- return '|'.join(lines)
-
-
--def construct_regex(blacklist_file, whitelist_file, regex, print_exclude):
-- """Deprecated, please use testlist_builder.construct_list instead."""
-- if not blacklist_file:
-+def get_regex_from_blacklist_file(file_path, print_exclude=False):
-+ exclude_regex = ''
-+ with open(file_path, 'r') as black_file:
- exclude_regex = ''
-- else:
-- with open(blacklist_file, 'r') as black_file:
-- exclude_regex = ''
-- for line in black_file:
-- raw_line = line.strip()
-- split_line = raw_line.split('#')
-- # Before the # is the regex
-- line_regex = split_line[0].strip()
-- if len(split_line) > 1:
-- # After the # is a comment
-- comment = split_line[1].strip()
-+ for line in black_file:
-+ raw_line = line.strip()
-+ split_line = raw_line.split('#')
-+ # Before the # is the regex
-+ line_regex = split_line[0].strip()
-+ if len(split_line) > 1:
-+ # After the # is a comment
-+ comment = split_line[1].strip()
-+ else:
-+ comment = ''
-+ if line_regex:
-+ if print_exclude:
-+ print_skips(line_regex, comment)
-+ if exclude_regex:
-+ exclude_regex = '|'.join([line_regex, exclude_regex])
- else:
-- comment = ''
-- if line_regex:
-- if print_exclude:
-- print_skips(line_regex, comment)
-- if exclude_regex:
-- exclude_regex = '|'.join([line_regex, exclude_regex])
-- else:
-- exclude_regex = line_regex
-- if exclude_regex:
-- exclude_regex = "^((?!" + exclude_regex + ").)*$"
-- if regex:
-- exclude_regex += regex
-- if whitelist_file:
-- exclude_regex += '%s' % get_regex_from_whitelist_file(whitelist_file)
-+ exclude_regex = line_regex
-+ if exclude_regex:
-+ exclude_regex = "(?!" + exclude_regex + ")"
- return exclude_regex
-+
-+
-+def construct_regex(blacklist_file, whitelist_file, regex, print_exclude):
-+ """Deprecated, please use testlist_builder.construct_list instead."""
-+ bregex = ''
-+ wregex = ''
-+ pregex = ''
-+
-+ if blacklist_file:
-+ bregex = get_regex_from_blacklist_file(blacklist_file, print_exclude)
-+ if whitelist_file:
-+ wregex = get_regex_from_whitelist_file(whitelist_file)
-+ if regex:
-+ pregex = regex
-+ combined_regex = '^%s.*(%s).*$' % (bregex, '|'.join(
-+ filter(None, [pregex, wregex])
-+ ))
-+
-+ return combined_regex
diff --git a/bin/run_tempest.sh b/bin/run_tempest.sh
index 2ddde95..cdbacc1 100755
--- a/bin/run_tempest.sh
+++ b/bin/run_tempest.sh
@@ -28,5 +28,5 @@
tempest run $ARGS | tee -a ${log}
if [[ "$ARGS" =~ '-r ' || "$ARGS" =~ '--regex' || "$ARGS" =~ '-s' || "$ARGS" =~ '--smoke' || "$ARGS" =~ '--blacklist-file' || "$ARGS" =~ '-w' || "$ARGS" == '' ]]; then
- testr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
+ stestr last --subunit | subunit2junitxml > $LOG_DIR/$report.xml || true
fi