[PATCH] YES! test: build on machines with only one cpu

Mattias Ryrlén mattias.ryrlen at op5.com
Thu Aug 29 14:42:18 CEST 2013


commit f0054ac856059183f6c7bc3f9e8a80965a8c0368 (HEAD, master)
Author: Mattias Ryrlén <mattiasr at op5.com>
Date:   Thu Aug 29 14:34:39 2013 +0200

    YES! test: build on machines with only one cpu

    There might be someone out there who still have only one cpu/core, let
those
    build too.

    Signed-off-by: Mattias Ryrlén <mattiasr at op5.com>

diff --git a/lib/test-nsutils.c b/lib/test-nsutils.c
index 1a23ee1..f835d67 100644
--- a/lib/test-nsutils.c
+++ b/lib/test-nsutils.c
@@ -31,10 +31,10 @@ int main(int argc, char **argv)
        asprintf(&s1, "arg varg foo %d", 12);
        s2 = mkstr("arg varg foo %d", 12);
        ok_str(s1, s2, "mkstr() must build proper strings");
-       if (online_cpus() > 1) {
+       if (online_cpus() > 0) {
                t_pass("%d online cpus detected", online_cpus());
        } else {
-               t_fail("Do you really have only one cpu core?");
+               t_fail("No online cpus detected");
        }
        return t_end();
 }

-- 
Vänliga hälsningar / Best Regards
Mattias Ryrlén

__________________________
op5 AB
Första Långgatan 19
SE-413 27 Göteborg
Mobil: +46 735-17 70 99
Support: +46 31-774 09 24
www.op5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20130829/549852e4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-YES-test-build-on-machines-with-only-one-cpu.patch
Type: application/octet-stream
Size: 1108 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20130829/549852e4/attachment.obj>
-------------- next part --------------
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list