Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
5acbeb96
Commit
5acbeb96
authored
10 years ago
by
Robin McCorkell
Browse files
Options
Downloads
Patches
Plain Diff
Better cleanup in autotest.sh
Configs correctly cleaned, even if phpunit fails or autotest interrupted
parent
55142186
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
autotest-external.sh
+10
-8
10 additions, 8 deletions
autotest-external.sh
autotest-hhvm.sh
+10
-8
10 additions, 8 deletions
autotest-hhvm.sh
autotest.sh
+10
-8
10 additions, 8 deletions
autotest.sh
with
32 additions
and
24 deletions
.gitignore
+
2
−
0
View file @
5acbeb96
...
...
@@ -109,3 +109,5 @@ Vagrantfile
/tests/autotest*
/tests/data/lorem-copy.txt
/tests/data/testimage-copy.png
/config/config-autotest-backup.php
/config/autoconfig.php
This diff is collapsed.
Click to expand it.
autotest-external.sh
+
10
−
8
View file @
5acbeb96
...
...
@@ -60,20 +60,25 @@ if [ "$1" ]; then
fi
fi
# Back up existing (dev) config if one exists
if
[
-f
config/config.php
]
;
then
# Back up existing (dev) config if one exists
and backup not already there
if
[
-f
config/config.php
]
&&
[
!
-f
config/config-autotest-backup.php
]
;
then
mv
config/config.php config/config-autotest-backup.php
fi
function
restore_config
{
function
cleanup_config
{
cd
"
$BASEDIR
"
# Restore existing config
if
[
-f
config/config-autotest-backup.php
]
;
then
mv
config/config-autotest-backup.php config/config.php
fi
# Remove autotest config
if
[
-f
config/autoconfig.php
]
;
then
rm
config/autoconfig.php
fi
}
# restore config on exit
, even when killed
trap
restore
_config
SIGINT SIGTERM
# restore config on exit
trap
cleanup
_config
EXIT
# use tmpfs for datadir - should speedup unit test execution
if
[
-d
/dev/shm
]
;
then
...
...
@@ -278,9 +283,6 @@ else
execute_tests
"
$1
"
"
$2
"
fi
cd
"
$BASEDIR
"
restore_config
#
# NOTES on mysql:
# - CREATE DATABASE oc_autotest;
...
...
This diff is collapsed.
Click to expand it.
autotest-hhvm.sh
+
10
−
8
View file @
5acbeb96
...
...
@@ -66,20 +66,25 @@ if [ "$1" ]; then
fi
fi
# Back up existing (dev) config if one exists
if
[
-f
config/config.php
]
;
then
# Back up existing (dev) config if one exists
and backup not already there
if
[
-f
config/config.php
]
&&
[
!
-f
config/config-autotest-backup.php
]
;
then
mv
config/config.php config/config-autotest-backup.php
fi
function
restore_config
{
function
cleanup_config
{
cd
"
$BASEDIR
"
# Restore existing config
if
[
-f
config/config-autotest-backup.php
]
;
then
mv
config/config-autotest-backup.php config/config.php
fi
# Remove autotest config
if
[
-f
config/autoconfig.php
]
;
then
rm
config/autoconfig.php
fi
}
# restore config on exit
, even when killed
trap
restore
_config
SIGINT SIGTERM
# restore config on exit
trap
cleanup
_config
EXIT
# use tmpfs for datadir - should speedup unit test execution
if
[
-d
/dev/shm
]
;
then
...
...
@@ -236,9 +241,6 @@ else
execute_tests
"
$1
"
"
$2
"
"
$3
"
fi
cd
"
$BASEDIR
"
restore_config
#
# NOTES on mysql:
# - CREATE DATABASE oc_autotest;
...
...
This diff is collapsed.
Click to expand it.
autotest.sh
+
10
−
8
View file @
5acbeb96
...
...
@@ -60,20 +60,25 @@ if [ "$1" ]; then
fi
fi
# Back up existing (dev) config if one exists
if
[
-f
config/config.php
]
;
then
# Back up existing (dev) config if one exists
and backup not already there
if
[
-f
config/config.php
]
&&
[
!
-f
config/config-autotest-backup.php
]
;
then
mv
config/config.php config/config-autotest-backup.php
fi
function
restore_config
{
function
cleanup_config
{
cd
"
$BASEDIR
"
# Restore existing config
if
[
-f
config/config-autotest-backup.php
]
;
then
mv
config/config-autotest-backup.php config/config.php
fi
# Remove autotest config
if
[
-f
config/autoconfig.php
]
;
then
rm
config/autoconfig.php
fi
}
# restore config on exit
, even when killed
trap
restore
_config
SIGINT SIGTERM
# restore config on exit
trap
cleanup
_config
EXIT
# use tmpfs for datadir - should speedup unit test execution
if
[
-d
/dev/shm
]
;
then
...
...
@@ -234,9 +239,6 @@ else
execute_tests
"
$1
"
"
$FILENAME
"
"
$3
"
fi
cd
"
$BASEDIR
"
restore_config
#
# NOTES on mysql:
# - CREATE DATABASE oc_autotest;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment