aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-02 13:43:21 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-02 13:49:55 +0300
commit8004bbaa1b31b14dd4c4d3886b5f57b103bf7405 (patch)
treea6fd826c284fe1e7131c4852c2964b6029ca758d /tests
parent685600d72b0c300f94c0c69dc0a16c4ebb230a21 (diff)
downloadpies-8004bbaa1b31b14dd4c4d3886b5f57b103bf7405.tar.gz
pies-8004bbaa1b31b14dd4c4d3886b5f57b103bf7405.tar.bz2
Speed up tests.
Presence of the ~/.netrc file can slow down execution because of eventual DNS calls in hostcmp. Provide an option to disable netrc parsing and use it in tests. * src/piesctl-cl.opt: New option: --no-netrc. * doc/pies.texi: Document --no-netrc * src/piesctl.c (shttp_connect): Don't read ~/.netrc if given --no-netrc. * tests/env.at: Pass --no-netrc to piesctl. * tests/respawn.at: Likewise. * tests/shell.at: Likewise. * tests/shutdown.at: Likewise. * tests/startup.at: Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/env.at4
-rw-r--r--tests/respawn.at2
-rw-r--r--tests/shell.at2
-rw-r--r--tests/shutdown.at4
-rw-r--r--tests/startup.at4
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/env.at b/tests/env.at
index c293c65..18b0e52 100644
--- a/tests/env.at
+++ b/tests/env.at
@@ -12,18 +12,18 @@ component envtest {
}
command "$abs_builddir/envtest -clone";
chdir $PWD;
stdout file "$PWD/log";
return-code 0 {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl shutdown";
+ exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
_EOT
-to 3 \
+to 5 \
envtest -exec \
$abs_top_builddir/src/pies --foreground --stderr \
--config-file control.conf --config-file envtest.conf 2>errlog
cat log
],
[0],
diff --git a/tests/respawn.at b/tests/respawn.at
index 0ba60dc..ab29f11 100644
--- a/tests/respawn.at
+++ b/tests/respawn.at
@@ -24,13 +24,13 @@ cat > pies.conf <<_EOT
component test {
mode respawn;
command "$auxdir/respawn $statefile 3";
chdir $PWD;
return-code 1 {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl shutdown";
+ exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
_EOT
to 5 \
pies --foreground --stderr \
diff --git a/tests/shell.at b/tests/shell.at
index e3d104b..b459d02 100644
--- a/tests/shell.at
+++ b/tests/shell.at
@@ -26,13 +26,13 @@ component test {
mode respawn;
flags shell;
command "if $auxdir/respawn $statefile 3; then echo pass; else exit 1; fi >> $outfile";
chdir $PWD;
return-code 1 {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl shutdown";
+ exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
_EOT
set -e
to 5 \
diff --git a/tests/shutdown.at b/tests/shutdown.at
index 1c2a4ef..24a4504 100644
--- a/tests/shutdown.at
+++ b/tests/shutdown.at
@@ -26,26 +26,26 @@ cat > pies.conf <<_EOT
component test {
mode respawn;
command "$auxdir/respawn $statefile 3";
chdir $PWD;
return-code 1 {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl shutdown";
+ exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
component s {
mode shutdown;
command "$auxdir/touchfile shutdown";
}
_EOT
set -e
to 5 \
pies --foreground --stderr \
- --config-file control.conf --config-file pies.conf 2>errlog
+ --config-file control.conf --config-file pies.conf --debug 1 2>errlog
cat shutdown
],
[0],
[shutdown
])
diff --git a/tests/startup.at b/tests/startup.at
index 22ad25b..b65f9f6 100644
--- a/tests/startup.at
+++ b/tests/startup.at
@@ -36,21 +36,21 @@ component test {
command "$auxdir/startcheck b1 b2";
chdir $PWD;
stdout file "log.out";
stderr file "log.err";
return-code * {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl shutdown";
+ exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
_EOT
set -e
to 5 \
pies --foreground --stderr \
- --config-file control.conf --config-file pies.conf 2>errlog
+ --config-file control.conf --config-file pies.conf --debug 1 2>errlog
cat log.out
cat log.err >&2
],
[0],
[# b1

Return to:

Send suggestions and report system problems to the System administrator.