You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2022/06/30 23:41:53 UTC

[commons-crypto] branch master updated: Add basic tests

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/master by this push:
     new 8539d5f  Add basic tests
8539d5f is described below

commit 8539d5f09e483d8a01635df9df062e0a4972a71d
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 1 00:41:45 2022 +0100

    Add basic tests
    
    [skip ci]
---
 src/docker/tests.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/src/docker/tests.sh b/src/docker/tests.sh
new file mode 100755
index 0000000..e6e3004
--- /dev/null
+++ b/src/docker/tests.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Run some additional tests
+
+crypto() {
+  CLASS=$1
+  echo crypto $CLASS
+  # This adds the necessary libraries
+  mvn -q exec:java -Dexec.mainClass=org.apache.commons.crypto.$CLASS
+  echo ""
+}
+
+example() {
+  CLASS=$1
+  echo example $CLASS
+  mvn -q exec:java  -Dexec.classpathScope=test -Dexec.mainClass=org.apache.commons.crypto.examples.$CLASS
+  echo ""
+}
+
+java -cp target/classes  org.apache.commons.crypto.Crypto
+
+example CipherByteArrayExample
+
+example RandomExample
+
+example StreamExample
+
+crypto jna.OpenSslJna