subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1308503 - /subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c
Date Mon, 02 Apr 2012 19:42:52 GMT
Author: danielsh
Date: Mon Apr  2 19:42:51 2012
New Revision: 1308503

URL: http://svn.apache.org/viewvc?rev=1308503&view=rev
Log:
Skip a test by skipping it, rather than by not-compiling it.

* subversion/tests/libsvn_subr/crypto-test.c
  (test_encrypt_decrypt_password): Rejigger ifdef's to make the test
    run and skip itself when !APU_HAVE_CRYPTO.

Modified:
    subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c?rev=1308503&r1=1308502&r2=1308503&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c Mon Apr  2 19:42:51 2012
@@ -74,10 +74,12 @@ encrypt_decrypt(svn_crypto__ctx_t *ctx,
   return SVN_NO_ERROR;
 }
 
+#endif  /* APU_HAVE_CRYPTO */
 
 static svn_error_t *
 test_encrypt_decrypt_password(apr_pool_t *pool)
 {
+#if APU_HAVE_CRYPTO
   svn_crypto__ctx_t *ctx;
   const svn_string_t *master = svn_string_create("Pastor Massword", pool);
   int i;
@@ -100,11 +102,13 @@ test_encrypt_decrypt_password(apr_pool_t
 
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
+#else
+  return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
+#endif  /* APU_HAVE_CRYPTO */
 }
 
 
 
-#endif  /* APU_HAVE_CRYPTO */
 
 
 /* The test table.  */
@@ -112,9 +116,7 @@ test_encrypt_decrypt_password(apr_pool_t
 struct svn_test_descriptor_t test_funcs[] =
   {
     SVN_TEST_NULL,
-#if APU_HAVE_CRYPTO
     SVN_TEST_PASS2(test_encrypt_decrypt_password,
                    "basic password encryption/decryption test"),
-#endif  /* APU_HAVE_CRYPTO */
     SVN_TEST_NULL
   };



Mime
View raw message