Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
d3027a30
Commit
d3027a30
authored
25 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
no watchdog when running testsuite in GDB
Rev: bin/test_pike.pike:1.37 Rev: src/Makefile.in:1.180
parent
97f6280d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/test_pike.pike
+30
-14
30 additions, 14 deletions
bin/test_pike.pike
src/Makefile.in
+2
-2
2 additions, 2 deletions
src/Makefile.in
with
32 additions
and
16 deletions
bin/test_pike.pike
+
30
−
14
View file @
d3027a30
#!/usr/local/bin/pike
/* $Id: test_pike.pike,v 1.3
6
2000/03/0
1 20:30:10
hubbe Exp $ */
/* $Id: test_pike.pike,v 1.3
7
2000/03/0
7 08:14:57
hubbe Exp $ */
import Stdio;
...
...
@@ -73,10 +73,13 @@ array find_testsuites(string dir)
return ret;
}
#if constant(thread_create)
#define WATCHDOG
object watchdog;
#define WATCHDOG_PIPE
object watchdog_pipe;
#else
#if constant(signal) && constant(signum)
#define WATCHDOG
...
...
@@ -84,6 +87,11 @@ array find_testsuites(string dir)
#endif
#endif
#ifdef WATCHDOG
int use_watchdog=1;
#endif
int main(int argc, string *argv)
{
int e, verbose, successes, errors, t, check;
...
...
@@ -112,6 +120,7 @@ int main(int argc, string *argv)
add_constant("RUNPIKE",Array.map(args,Process.sh_quote)*" ");
foreach(Getopt.find_all_options(argv,aggregate(
({"no-watchdog",Getopt.NO_ARG,({"--no-watchdog"})}),
({"watchdog",Getopt.HAS_ARG,({"--watchdog"})}),
({"help",Getopt.NO_ARG,({"-h","--help"})}),
({"verbose",Getopt.NO_ARG,({"-v","--verbose"})}),
...
...
@@ -131,6 +140,10 @@ int main(int argc, string *argv)
{
switch(opt[0])
{
case "no-watchdog":
use_watchdog=0;
break;
case "watchdog":
#ifdef WATCHDOG
int cnt=0;
...
...
@@ -252,20 +265,22 @@ int main(int argc, string *argv)
#ifdef WATCHDOG
int watchdog_time=time();
if(use_watchdog)
{
#ifdef WATCHDOG_PIPE
object watchdog_tmp=Stdio.File();
object
watchdog_pipe=watchdog_tmp->pipe(Stdio.PROP_IPC);
object
watchdog=Process.create_process(
watchdog_pipe=watchdog_tmp->pipe(Stdio.PROP_IPC);
watchdog=Process.create_process(
backtrace()[0][3] + ({ "--watchdog="+getpid() }),
(["stdin":watchdog_tmp ]));
destruct(watchdog_tmp);
#endif
#ifdef WATCHDOG_SIGNAL
object
watchdog=Process.create_process(
watchdog=Process.create_process(
backtrace()[0][3] + ({ "--watchdog="+getpid() }) );
#endif
}
#endif
argv=Getopt.get_args(argv,1)+testsuites;
...
...
@@ -299,7 +314,7 @@ int main(int argc, string *argv)
for(e=start;e<sizeof(tests);e++)
{
#ifdef WATCHDOG
if(time() - watchdog_time > 30)
if(
use_watchdog &&
time() - watchdog_time > 30)
{
watchdog_time=time();
// werror("{WATCHDOG} Ping!\n");
...
...
@@ -625,6 +640,7 @@ int main(int argc, string *argv)
werror("Total tests: %d (%d tests skipped)\n",successes+errors,skipped);
#ifdef WATCHDOG_SIGNAL
if(use_watchdog)
watchdog->kill(signum("SIGKILL"));
#endif
...
...
This diff is collapsed.
Click to expand it.
src/Makefile.in
+
2
−
2
View file @
d3027a30
#
# $Id: Makefile.in,v 1.1
79
2000/0
2/26 03:08:49
hubbe Exp $
# $Id: Makefile.in,v 1.1
80
2000/0
3/07 08:15:03
hubbe Exp $
#
# This line is needed on some machines.
...
...
@@ -370,7 +370,7 @@ gdb_verify: module_testsuites testsuite master.pike
@
echo
>>
.gdbinit handle SIGUSR2 nostop noprint pass
@
echo
>>
.gdbinit handle SIGLWP nostop noprint pass
@
echo
>>
.gdbinit
break
debug_fatal
@
echo
>>
.gdbinit run
-m
$(
TMP_BUILDDIR
)
/master.pike
$(
PIKEOPTS
)
$(
TMP_BINDIR
)
/test_pike.pike
-v
-v
-f
$(
TESTARGS
)
@
echo
>>
.gdbinit run
-m
$(
TMP_BUILDDIR
)
/master.pike
$(
PIKEOPTS
)
$(
TMP_BINDIR
)
/test_pike.pike
--no-watchdog
-v
-v
-f
$(
TESTARGS
)
gdb ./pike
@
rm
.gdbinit
...
...
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