Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
2c11339a
Commit
2c11339a
authored
Nov 24, 2008
by
Dries
Browse files
- Patch
#338516
by Damien Tournoud: convert run-tests.sh to the new database API.
parent
60065c68
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/run-tests.sh
View file @
2c11339a
...
...
@@ -72,8 +72,7 @@
simpletest_script_reporter_init
()
;
// Setup database
for
test
results.
db_query
(
'INSERT INTO {simpletest_test_id} VALUES (default)'
)
;
$test_id
=
db_last_insert_id
(
'simpletest_test_id'
,
'test_id'
)
;
$test_id
=
db_insert
(
'simpletest_test_id'
)
->useDefaults
(
array
(
'test_id'
))
->execute
()
;
// Execute tests.
simpletest_script_command
(
$args
[
'concurrency'
]
,
$test_id
, implode
(
","
,
$test_list
))
;
...
...
@@ -82,8 +81,9 @@
simpletest_script_reporter_display_results
()
;
// Cleanup our
test
results.
db_query
(
"DELETE FROM {simpletest} WHERE test_id = %d"
,
$test_id
)
;
db_delete
(
"simpletest"
)
->condition
(
'test_id'
,
$test_id
)
->execute
()
;
/
**
...
...
@@ -476,9 +476,9 @@ function simpletest_script_reporter_display_results() {
'exception'
=>
'Exception'
)
;
$results
=
db_query
(
"SELECT * FROM {simpletest} WHERE test_id =
%
d ORDER BY test_class, message_id"
,
$test_id
)
;
$results
=
db_query
(
"SELECT * FROM {simpletest} WHERE test_id =
:test_i
d ORDER BY test_class, message_id"
,
array
(
':test_id'
=>
$test_id
)
)
;
$test_class
=
''
;
while
(
$result
=
db_fetch_object
(
$result
s
)
)
{
foreach
(
$results
as
$result
)
{
if
(
isset
(
$results_map
[
$result
->status]
))
{
if
(
$result
->test_class
!=
$test_class
)
{
// Display
test
class every
time
results are
for
new
test
class.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment