-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: myTAP implementation of pgTAP runtests
#50
base: master
Are you sure you want to change the base?
Conversation
Tests do not take 40 seconds on my 10yo laptop
Removed ambiguity on test file names
END IF; | ||
|
||
SET @call_sql = CONCAT('CALL ', db_, '.', proc_to_call, '()'); | ||
PREPARE call_sql FROM @call_sql; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to use "random" @
variables? Should we take care about potential conflicts (like rename this variable to @mytap__call_sql
)?
mytap-runtests.sql
Outdated
DEALLOCATE PREPARE call_sql; | ||
END LOOP; | ||
CLOSE c; | ||
end // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix case.
|
||
CALL tap.runtests(DATABASE()); | ||
|
||
CREATE TEMPORARY TABLE test_runtests2 LIKE test_runtests; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LIKE base__test_runtests
.
@@ -70,6 +70,7 @@ BEGIN | |||
CALL _run_proc_by_prefix(db_, 'setup'); | |||
SET @call_sql = CONCAT('CALL ', db_, '.', test_to_call, '()'); | |||
PREPARE call_sql FROM @call_sql; | |||
SELECT CONCAT("# ... ", test_to_call); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe for i.e. my_prove? I was unable to test it.
@@ -46,9 +46,18 @@ BEGIN | |||
ROUTINE_TYPE = 'PROCEDURE' | |||
AND ROUTINE_SCHEMA = db_ | |||
AND ROUTINE_NAME LIKE 'test%' | |||
ORDER BY ROUTINE_NAME; | |||
ORDER BY | |||
IF(random_seed IS NULL, NULL, RAND(random_seed)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight chance that shuffled order will be same as alphabetical one, but I don't think that's problem.
Travis / my_prove said:
The only possibility I see is to run all assertions in one plan. |
bb357d7
to
7fcfa05
Compare
Interesting case in build 31 for MySQL 5.7 (https://travis-ci.org/hepabolu/mytap/builds/603775539?utm_medium=notification&utm_source=github_status) -- it look there is a bug which arises when using constructions like It's safer to use session variables. |
... as mentioned in #48. This branch is on top of #49.