From f5c3c2c0ac75433bb255bcd159c8dd2193a37ec8 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 28 Jul 2010 14:20:58 +0000 Subject: [PATCH] s/ompi/opal/gi in all of these files because they're really OPAL tests, not OMPI tests. This allows us to "make distcheck" with "./autogen.sh -no-ompi" trees (i.e., these tests will now still work even if the OMPI layer is not present -- because they're OPAL tests and we should treat them that way). This commit was SVN r23524. --- test/asm/atomic_barrier.c | 3 ++- test/asm/atomic_cmpset.c | 3 ++- test/asm/atomic_math.c | 3 ++- test/asm/atomic_spinlock.c | 3 ++- test/class/ompi_rb_tree.c | 4 +-- test/class/opal_hash_table.c | 4 +-- test/class/opal_list.c | 4 +-- test/class/opal_pointer_array.c | 3 ++- test/class/opal_value_array.c | 4 +-- test/support/components.c | 20 +++++++-------- test/support/support.c | 45 +++++++++++++++++---------------- test/threads/opal_condition.c | 4 +-- test/threads/opal_thread.c | 7 ++++- test/util/opal_path_nfs.c | 2 +- 14 files changed, 60 insertions(+), 49 deletions(-) diff --git a/test/asm/atomic_barrier.c b/test/asm/atomic_barrier.c index b7c30e8163..c94ae2f0bb 100644 --- a/test/asm/atomic_barrier.c +++ b/test/asm/atomic_barrier.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +18,7 @@ */ #define OMPI_BUILDING 0 -#include "ompi_config.h" +#include "opal_config.h" #include "opal/sys/atomic.h" diff --git a/test/asm/atomic_cmpset.c b/test/asm/atomic_cmpset.c index 101d0725d2..e3305e2ef1 100644 --- a/test/asm/atomic_cmpset.c +++ b/test/asm/atomic_cmpset.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +18,7 @@ */ #define OMPI_BUILDING 0 -#include "ompi_config.h" +#include "opal_config.h" #undef NDEBUG #define DEBUG diff --git a/test/asm/atomic_math.c b/test/asm/atomic_math.c index 3644ac966d..6505ad174c 100644 --- a/test/asm/atomic_math.c +++ b/test/asm/atomic_math.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +18,7 @@ */ #define OMPI_BUILDING 0 -#include "ompi_config.h" +#include "opal_config.h" #ifdef HAVE_PTHREAD_H #include diff --git a/test/asm/atomic_spinlock.c b/test/asm/atomic_spinlock.c index bc8d3f20f1..710bc9ddce 100644 --- a/test/asm/atomic_spinlock.c +++ b/test/asm/atomic_spinlock.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +18,7 @@ */ #define OMPI_BUILDING 0 -#include "ompi_config.h" +#include "opal_config.h" #ifdef HAVE_PTHREAD_H #include diff --git a/test/class/ompi_rb_tree.c b/test/class/ompi_rb_tree.c index eade595f32..9be72e277b 100644 --- a/test/class/ompi_rb_tree.c +++ b/test/class/ompi_rb_tree.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +17,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #ifdef HAVE_STDINT_H #include #endif diff --git a/test/class/opal_hash_table.c b/test/class/opal_hash_table.c index 42df565f80..e3f6a99baf 100644 --- a/test/class/opal_hash_table.c +++ b/test/class/opal_hash_table.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +17,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #ifdef HAVE_STDINT_H #include #endif diff --git a/test/class/opal_list.c b/test/class/opal_list.c index 8db5e142c4..423fbda7e6 100644 --- a/test/class/opal_list.c +++ b/test/class/opal_list.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +17,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #include #include "support.h" diff --git a/test/class/opal_pointer_array.c b/test/class/opal_pointer_array.c index 4b00764bc4..cfd8443a9f 100644 --- a/test/class/opal_pointer_array.c +++ b/test/class/opal_pointer_array.c @@ -10,6 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -22,7 +23,7 @@ * class */ -#include "ompi_config.h" +#include "opal_config.h" #include #include #include diff --git a/test/class/opal_value_array.c b/test/class/opal_value_array.c index 81dabd44b5..cb4b2f382b 100644 --- a/test/class/opal_value_array.c +++ b/test/class/opal_value_array.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -21,7 +21,7 @@ * This test is intended to test the opal_value_array class */ -#include "ompi_config.h" +#include "opal_config.h" #include #include #include diff --git a/test/support/components.c b/test/support/components.c index 516380e7c1..41c4345eb8 100644 --- a/test/support/components.c +++ b/test/support/components.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,12 +17,12 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #include #include -#include "ompi/constants.h" +#include "opal/constants.h" #include "opal/mca/mca.h" #include "opal/libltdl/ltdl.h" @@ -46,7 +46,7 @@ int test_component_open(const char *framework, const char *component, if (NULL == framework || NULL == component || NULL == comp_handle || NULL == mca) { - return OMPI_ERR_BAD_PARAM; + return OPAL_ERR_BAD_PARAM; } comp_handle->tch_handle = NULL; sym.tcs_variable = NULL; @@ -70,8 +70,8 @@ int test_component_open(const char *framework, const char *component, *mca = (mca_base_component_t*) sym.tcs_variable; if (NULL == (*mca)->mca_open_component || (NULL != (*mca)->mca_open_component && - OMPI_SUCCESS == (*mca)->mca_open_component())) { - return OMPI_SUCCESS; + OPAL_SUCCESS == (*mca)->mca_open_component())) { + return OPAL_SUCCESS; } /* Badness occurred, so dlclose the component */ @@ -81,7 +81,7 @@ int test_component_open(const char *framework, const char *component, /* Didn't find it / unable to open it */ - return OMPI_ERROR; + return OPAL_ERROR; } @@ -100,12 +100,12 @@ int test_component_find_symbol(const char *name, } value; if (NULL == handle || NULL == sym) { - return OMPI_ERR_BAD_PARAM; + return OPAL_ERR_BAD_PARAM; } value.vvalue = lt_dlsym(handle->tch_handle, name); sym->tcs_function = value.fvalue; - return OMPI_SUCCESS; + return OPAL_SUCCESS; } @@ -121,7 +121,7 @@ int test_component_close(test_component_handle_t *handle) handle->tch_handle = NULL; } - return OMPI_SUCCESS; + return OPAL_SUCCESS; } diff --git a/test/support/support.c b/test/support/support.c index efa70be585..e9b814a010 100644 --- a/test/support/support.c +++ b/test/support/support.c @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -16,7 +17,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #include #include #include @@ -28,10 +29,10 @@ * A testing support library to provide uniform reporting output */ -static int ompi_n_tests; -static int ompi_n_success; -static int ompi_n_failures; -static char *ompi_description; +static int opal_n_tests; +static int opal_n_success; +static int opal_n_failures; +static char *opal_description; void test_init(const char *a) { @@ -40,15 +41,15 @@ void test_init(const char *a) /* save the descriptive string */ len = strlen(a); - ompi_description = (char *) malloc(len + 1); - assert(ompi_description); + opal_description = (char *) malloc(len + 1); + assert(opal_description); - strcpy(ompi_description, a); + strcpy(opal_description, a); /* initialize counters */ - ompi_n_tests = 0; - ompi_n_success = 0; - ompi_n_failures = 0; + opal_n_tests = 0; + opal_n_success = 0; + opal_n_failures = 0; return; @@ -57,18 +58,18 @@ void test_init(const char *a) void test_success(void) { - ompi_n_tests++; - ompi_n_success++; + opal_n_tests++; + opal_n_success++; } void test_failure(const char *a) { - ompi_n_tests++; - ompi_n_failures++; + opal_n_tests++; + opal_n_failures++; fprintf(stderr, " Failure : "); - fprintf(stderr, a); + fprintf(stderr, "%s", a); fprintf(stderr, "\n"); fflush(stderr); } @@ -123,20 +124,20 @@ int test_finalize(void) return_value = 0; - if (ompi_n_tests == ompi_n_success) { + if (opal_n_tests == opal_n_success) { fprintf(stderr, "SUPPORT: OMPI Test Passed: %s: (%d tests)\n", - ompi_description, ompi_n_tests); + opal_description, opal_n_tests); fflush(stderr); } else { fprintf(stderr, "SUPPORT: OMPI Test failed: %s (%d of %d failed)\n", - ompi_description, ompi_n_failures, ompi_n_tests); + opal_description, opal_n_failures, opal_n_tests); fflush(stderr); return_value = 1; } - if (NULL != ompi_description) - free(ompi_description); + if (NULL != opal_description) + free(opal_description); return return_value; } @@ -145,7 +146,7 @@ int test_finalize(void) /* note this is for additional output that does NOT go to STDERR but STDOUT */ void test_comment (const char* userstr) { - fprintf(stdout, "%s:%s\n", ompi_description, userstr); + fprintf(stdout, "%s:%s\n", opal_description, userstr); } diff --git a/test/threads/opal_condition.c b/test/threads/opal_condition.c index 780a612897..e18999eec5 100644 --- a/test/threads/opal_condition.c +++ b/test/threads/opal_condition.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +17,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #include #include diff --git a/test/threads/opal_thread.c b/test/threads/opal_thread.c index 9f7469ec36..8afc446108 100644 --- a/test/threads/opal_thread.c +++ b/test/threads/opal_thread.c @@ -1,4 +1,9 @@ -#include "ompi_config.h" +/* + * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + */ + +#include "opal_config.h" #include diff --git a/test/util/opal_path_nfs.c b/test/util/opal_path_nfs.c index b99d5cd276..1b00a4a004 100644 --- a/test/util/opal_path_nfs.c +++ b/test/util/opal_path_nfs.c @@ -19,7 +19,7 @@ * $HEADER$ */ -#include "ompi_config.h" +#include "opal_config.h" #include #include