Add negative lookahead to post_test_hook to skip slow tests.

This will skip a few slow tests in compute and volume with the
@test.attr(type='slow') decorator above that, so that the patrole
tests that run in the tempest gates can finish in a reasonable
amount of time.

The post_test_hook can later be modified, once new gates are
introduced in infra, to run the slow tests independent from
the "fast" tests.

Change-Id: I794a5da46a11bedd92a91d4b4c1f69f3d6e4e804
Partially-Implements: blueprint decrease-tempest-gate-runtime
diff --git a/contrib/post_test_hook.sh b/contrib/post_test_hook.sh
index ea4b5e3..3961474 100644
--- a/contrib/post_test_hook.sh
+++ b/contrib/post_test_hook.sh
@@ -26,7 +26,11 @@
 
 TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
 TEMPEST_COMMAND="sudo -H -u tempest tox"
-DEVSTACK_GATE_TEMPEST_REGEX="(^patrole_tempest_plugin\.tests\.api)"
+# TODO(felipemonteiro): This regex does a negative lookahead to exclude slow
+# tests that contain the @test.attr(type='slow') decorator above them. Slower
+# tests will execute those tests in a separate gate, which will require
+# future modification of this script.
+DEVSTACK_GATE_TEMPEST_REGEX="(?!.*\[.*\bslow\b.*\])(^patrole_tempest_plugin\.tests\.api)"
 
 # Import devstack function 'iniset'.
 source $BASE/new/devstack/functions