Displaying 20 results from an estimated 110 matches for "run_test".
2012 Sep 06
2
[LLVMdev] LNT: failing to parse compiler info: what am I doing wrong?
...dev', 'console_scripts', 'lnt')()
File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 281, in main
commands[cmd](cmd, args[1:])
File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 149,
in action_runtest
report = test_instance.run_test('%s %s' % (name, test_name), args)
File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 1288, in run_test
report = run_test(nick, opts, None, report_dir)
File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 645, in run_test
target_flags)
File &q...
2012 Sep 06
0
[LLVMdev] LNT: failing to parse compiler info: what am I doing wrong?
...ripts', 'lnt')()
> File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 281, in main
> commands[cmd](cmd, args[1:])
> File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 149,
> in action_runtest
> report = test_instance.run_test('%s %s' % (name, test_name), args)
> File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 1288, in run_test
> report = run_test(nick, opts, None, report_dir)
> File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 645, in run_test
> tar...
2012 May 11
0
[patch] Behavior of .C() and .Fortran() when given double(0) or integer(0) (repost).
...Integer vector with 1 element and DUP=FALSE:
Pointer to arg: 0x275e0e0.
Return value: [1] 0
Integer vector with 0 elements and DUP=FALSE:
Pointer to arg: (nil).
Return value: integer(0)
-------------- next part --------------
sessionInfo()
cat("\n")
dyn.load("dotC_NULL.so")
run_test<-function(desc,Cfun,args){
cat(desc,"\n")
out <- do.call(".C",c(list(Cfun),args))
cat("Return value: ")
print(out[[1]])
cat("\n")
}
run_test("R_alloc asked to allocate 1 byte:", "R_alloc_test",list(nbytes=as.integer(1)))...
2008 Jan 22
1
Newbie question on Scheduling
...'m curious as to how to layout a
worker properly. Here''s a basic example of what one of my workers looks
like:
class FooWorker < BackgrounDRb::MetaWorker
set_worker_name :foo_worker
def create(args = nil)
logger.info("Starting test: #{Time.now.strftime("%T")}")
run_test
logger.info("Finished test: #{Time.now.strftime("%T")}")
exit
end
def run_test
logger.info("aaaa")
sleep(30)
logger.info("bbbb")
end
end
I''d set my workers up like this while I was testing things. I''d modify them
and restart backgroundrb t...
2012 Sep 06
1
[LLVMdev] LNT: failing to parse compiler info: what am I doing wrong?
...')()
>> File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 281, in main
>> commands[cmd](cmd, args[1:])
>> File "/home/sean/pg/others/llvm/lnt/lnt/lnttool/main.py", line 149,
>> in action_runtest
>> report = test_instance.run_test('%s %s' % (name, test_name), args)
>> File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 1288, in run_test
>> report = run_test(nick, opts, None, report_dir)
>> File "/home/sean/pg/others/llvm/lnt/lnt/tests/nt.py", line 645, in run_test...
2020 Apr 16
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...48,7 @@ struct vdev_info {
>
> static const struct vhost_vring_file no_backend = { .fd = -1 },
> backend = { .fd = 1 };
> +static const struct vhost_vring_state null_state = {};
>
> bool vq_notify(struct virtqueue *vq)
> {
> @@ -174,14 +174,19 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
> unsigned len;
> long long spurious = 0;
> const bool random_batch = batch == RANDOM_BATCH;
> +
> r = ioctl(dev->control, VHOST_TEST_RUN, &test);
> assert(r >= 0);
> + if (!reset_n) {
> + next_reset = INT_MAX;...
2008 Jan 28
9
Nested matchers
...butes=).with(:game_file =>
kind_of(GameFile), :game_id => @game.id)
This expectation was passing with 0.5.5, but fails with 0.5.6.
I added this test to parameter_matcher_acceptance_test.rb, which
passes in 0.5.5 and fails in 0.5.6
def test_should_match_nested_parameters
test_result = run_test do
mock = mock()
mock.expects(:method).with(:literal_key => kind_of(Integer))
mock.method(:literal_key => 1)
end
assert_passed(test_result)
end
Any insight?
2020 Apr 17
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
...kend = { .fd = -1 },
> > > backend = { .fd = 1 };
> > > +static const struct vhost_vring_state null_state = {};
> > >
> > > bool vq_notify(struct virtqueue *vq)
> > > {
> > > @@ -174,14 +174,19 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
> > > unsigned len;
> > > long long spurious = 0;
> > > const bool random_batch = batch == RANDOM_BATCH;
> > > +
> > > r = ioctl(dev->control, VHOST_TEST_RUN, &test);
> > >...
2015 Jun 24
1
Re: [PATCH 6/7] tests: Add tests using a captive daemon process.
..."} /ge;
> +
> +# Refuse to run if the user is trying to run tests as root. There's
> +# too much risk that things will go badly wrong.
> +if ($> == 0) {
> + print "$0: don't run the libguestfs tests as root!\n";
> + exit 77
> +}
> +
> +sub run_tests {
> [...]
> + # Run the user tests.
> + my $r = ::tests ($g);
Minor detail: would it be possible to take as parameter of run_tests
an array of function pointers? This way more tests can be called
together, implementing them in different functions.
--
Pino Toscano
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...gboolean success; /* TRUE if test was successful, FALSE on error */
+ GMutex * mutex; /* NULL or mutex for protecting output */
+ GCond * cond; /* NULL or cond to signal after setting output */
};
static Test *
@@ -77,8 +79,9 @@ fscommand_cb (SwfdecPlayer *player, cons
}
static void
-run_test (Test *test)
+run_test (gpointer testp, gpointer unused)
{
+ Test *test = testp;
SwfdecLoader *loader;
SwfdecPlayer *player;
SwfdecBuffer *buffer;
@@ -179,17 +182,27 @@ run_test (Test *test)
g_string_append (output, " OK\n");
test->success = TRUE;
fail:
+ if (test-&...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...test/sound/sound.c
+++ b/test/sound/sound.c
@@ -245,7 +245,7 @@ error:
int
main (int argc, char **argv)
{
- guint failed_tests = 0;
+ GList *failed_tests = NULL;
swfdec_init ();
@@ -253,7 +253,7 @@ main (int argc, char **argv)
int i;
for (i = 1; i < argc; i++) {
if (!run_test (argv[i]))
- failed_tests++;
+ failed_tests = g_list_prepend (failed_tests, g_strdup (argv[i]));;
}
} else {
GDir *dir;
@@ -263,16 +263,24 @@ main (int argc, char **argv)
if (!g_str_has_suffix (file, ".swf"))
continue;
if (!run_test (file))
- failed_tests++;
+...
2012 May 04
4
[patch] Behavior of .C() and .Fortran() when given double(0) or integer(0).
...Integer vector with 1 element and DUP=FALSE:
Pointer to arg: 0x275e0e0.
Return value: [1] 0
Integer vector with 0 elements and DUP=FALSE:
Pointer to arg: (nil).
Return value: integer(0)
-------------- next part --------------
sessionInfo()
cat("\n")
dyn.load("dotC_NULL.so")
run_test<-function(desc,Cfun,args){
cat(desc,"\n")
out <- do.call(".C",c(list(Cfun),args))
cat("Return value: ")
print(out[[1]])
cat("\n")
}
run_test("R_alloc asked to allocate 1 byte:", "R_alloc_test",list(nbytes=as.integer(1)))...
2014 Jul 04
2
[LLVMdev] Using git bisect with LLVM
...ng)"
cd $LLVM_SRC/projects/compiler-rt
git checkout "$(git rev-list -n 1 --before="$committer_date"
origin/google/testing)"
}
build() {
cd $LLVM_BUILD
ninja
}
# Go for it!
checkout || exit 125
build || exit 125
run_test
The code will, for a given LLVM revision, checkout the latest revision from
the google/testing branch for both clang and compiler-rt. It will then
compile everything. If either fails, the script exits with code 125, which
tells git bisect to skip the current commit and try another one.
Hope this...
2007 Jun 15
0
Branch 'as' - 4 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite.c test/trace
...string_append_printf (string, "%s\n", message);
}
+static void
+fscommand_cb (SwfdecPlayer *player, const char *command, const char *parameter, gpointer data)
+{
+ gboolean *quit = data;
+
+ if (g_str_equal (command, "quit")) {
+ *quit = TRUE;
+ }
+}
+
static gboolean
run_test (const char *filename)
{
SwfdecLoader *loader;
SwfdecPlayer *player;
SwfdecBuffer *buffer;
- guint advance;
+ guint time_left;
char *str;
GString *string;
GError *error = NULL;
+ gboolean quit = FALSE;
g_print ("Testing %s:\n", filename);
loader = swfdec_load...
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
...m>
---
tools/virtio/virtio_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index 76d6f583c249..0fecaec90d0d 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
test = 0;
r = ioctl(dev->control, VHOST_TEST_RUN, &test);
assert(r >= 0);
- fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious);
+ fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious);
}
const char optstring[]...
2015 Jun 25
0
[PATCH v2 7/9] tests: daemon: Cleanly shut down the daemon on exit.
..."cause the daemon to exit (internal use only)";
longdesc = "\
diff --git a/tests/daemon/captive-daemon.pm.in b/tests/daemon/captive-daemon.pm.in
index 991a9a1..19833b8 100644
--- a/tests/daemon/captive-daemon.pm.in
+++ b/tests/daemon/captive-daemon.pm.in
@@ -93,14 +93,15 @@ sub run_tests {
# libguestfs live.
$g = Sys::Guestfs->new ();
$g->set_backend ("unix:" . $sockname);
+ $g->set_autosync (0);
$g->launch;
# Run the user tests.
my $r = ::tests ($g);
- # Close the socket. The daemon should now exit.
- $g->shutdo...
2015 Jun 29
1
Re: [PATCH v2 6/9] tests: Add tests using a captive daemon process.
...Richard W.M. Jones ha scritto:
> This allows us to test the daemon running as a host process, allowing
> us to meaningfully test it using valgrind.
>
> This commit only adds a single test that check that the daemon starts
> up, can be pinged, and exits.
> ---
> [...]> +sub run_tests {
> + my $g = Sys::Guestfs->new();
> + my $tmpdir = $g->get_tmpdir;
> + my $verbose = $g->get_verbose;
On this throw-away handle we could check whether the unix backend is
built in (unlike in RHEL, for example):
eval {
$g->set_backend ("unix:/idontexist&q...
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
...m>
---
tools/virtio/virtio_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index 76d6f583c249..0fecaec90d0d 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
test = 0;
r = ioctl(dev->control, VHOST_TEST_RUN, &test);
assert(r >= 0);
- fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious);
+ fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious);
}
const char optstring[]...
2007 Jun 13
0
Branch 'as' - 2 commits - libswfdec/swfdec_sprite.c test/trace
...a28bd0320a3af095152f11883e3af38152208d27)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 13 18:19:18 2007 +0200
simplify code
diff --git a/test/trace/trace.c b/test/trace/trace.c
index 990e7cb..55f8e98 100644
--- a/test/trace/trace.c
+++ b/test/trace/trace.c
@@ -17,7 +17,7 @@ run_test (const char *filename)
SwfdecLoader *loader;
SwfdecPlayer *player;
SwfdecBuffer *buffer;
- guint time_left;
+ guint advance;
char *str;
GString *string;
GError *error = NULL;
@@ -38,17 +38,8 @@ run_test (const char *filename)
return FALSE;
}
- time_left = ceil (10000...
2014 Jan 22
1
Behavior of --install-tests and testInstalledPackage
...ny packages loaded in my current environment have no effect on the tests. The only workaround that I've come up with is to add require statements to the top of each test file, but this is a bit onerous.
My question is whether
1) there is a technique to force the test harness script (e.g. tests/run_tests.R, tests/doRUnit.R) to be copied into the installed source package, or
2) there is a way to have testInstalledPackage force the loading of required packages prior to executing test scripts, or
3) has someone already done this?
Thanks and Regards,
Brian