]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.profiler.sampling.tests: attempt to fix the unit test that fails on x86.32...
authorBjörn Lindqvist <bjourne@gmail.com>
Tue, 31 May 2016 20:14:18 +0000 (22:14 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Tue, 31 May 2016 20:15:08 +0000 (22:15 +0200)
basis/tools/profiler/sampling/sampling-tests.factor

index 8d24ae429353bc148dd75587e95718caf7f966f4..f2beb18d0e2f8aeacae8e4145eda55bc92c5aae1 100644 (file)
@@ -17,10 +17,12 @@ TUPLE: boom ;
 f raw-profile-data set-global
 gc
 
-{ t 0 } [
+{ t t } [
     ! Seed the samples data
     [ "resource:basis/tools/memory/memory.factor" run-file ] profile
     (get-samples) length 0 >
-    ! Should clear it
-    gc [ ] profile (get-samples) length
+    ! On x86.64, [ ] profile doesn't generate any samples at all
+    ! because it runs so quickly. On x86.32, one spurious sample is
+    ! sometimes generated for some unknown reason.
+    gc [ ] profile (get-samples) length 1 <=
 ] unit-test