Changeset 13ab94b in rtems


Ignore:
Timestamp:
Feb 6, 2014, 6:51:01 PM (5 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, master
Children:
9db8705
Parents:
e5bcb24b
git-author:
Jennifer Averett <jennifer.averett@…> (02/06/14 18:51:01)
git-committer:
Jennifer Averett <jennifer.averett@…> (03/07/14 15:07:17)
Message:

spcpuset01: Add check for sys/cpuset.h.

If <sys/cpuset.h> is not provided by the toolset, the test
cannot be compiled.

Location:
testsuites/sptests/spcpuset01
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spcpuset01/init.c

    re5bcb24b r13ab94b  
    1212#include <stdio.h>
    1313#include <assert.h>
    14 
    15 #include <sys/cpuset.h>
    1614#include "system.h"
    1715
     16
     17#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    1818static void test_cpu_zero_case_1(void)
    1919{
     
    154154  exit( 0 );
    155155}
     156#else
     157#error "Init - No cpuset"
     158rtems_task Init(
     159  rtems_task_argument ignored
     160)
     161{
     162  puts( "*** CPUSET01 Test ***" );
     163  puts( "  cpuset not supported\n" );
     164  puts( "*** END OF CPUSET01 Test ***" );
     165  exit( 0 );
     166}
     167#endif
  • testsuites/sptests/spcpuset01/system.h

    re5bcb24b r13ab94b  
    1010#include "tmacros.h"
    1111#include "test_support.h"
     12
     13#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
     14
    1215#include <sys/cpuset.h>
     16
     17/* global variables */
     18extern cpu_set_t set1;
     19extern cpu_set_t set2;
     20extern cpu_set_t set3;
     21#endif
    1322
    1423/* functions */
     
    1726  rtems_task_argument argument
    1827);
    19 
    20 /* global variables */
    21 extern cpu_set_t set1;
    22 extern cpu_set_t set2;
    23 extern cpu_set_t set3;
    2428
    2529void cpuset_logic_test(void);
  • testsuites/sptests/spcpuset01/test.c

    re5bcb24b r13ab94b  
     1#if HAVE_CONFIG_H
     2#include "config.h"
     3#endif
     4
    15/*
    26 *  Fully exercise CPU_SET() methods
     
    711#include <stdio.h>
    812#include <assert.h>
    9 #include <sys/cpuset.h>
    1013#include "system.h"
    1114
    12 
     15#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    1316void test_cpu_and_case_1(size_t cpu1, size_t cpu2);
    1417void test_cpu_nand_case_1(size_t cpu1, size_t cpu2);
     
    123126  }
    124127}
    125 
     128#endif
Note: See TracChangeset for help on using the changeset viewer.