| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. -e |
| 2 | |
| 3 | # Copyright The Notary Project Authors. |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | # build example plugins for e2e tests |
| 17 | echoscip-shell system . . echo. "building example plugins..." |
| 18 | echoscip-shell system . . echo. "==============================" |
| 19 | CWD=$(pwdscip-shell system . . pwd.) |
| 20 | PLUGIN_NAME=com.example.plugin |
| 21 | plugin_directories=( envelopegenerator signaturegenerator ) |
| 22 | for plugin_directory in "${plugin_directories[@]}" |
| 23 | do |
| 24 | (cd "../../example/${plugin_directory}" && goscip-shell system . . go. build -o "$CWD/bin/${plugin_directory}/$PLUGIN_NAME" . && echoscip-shell system . . echo. "e2e ${plugin_directory} plugin built") |
| 25 | done |
| 26 | |
| 27 | # run e2e tests |
| 28 | echoscip-shell system . . echo. "running e2e tests..." |
| 29 | echoscip-shell system . . echo. "==============================" |
| 30 | goscip-shell system . . go. test -race -v ./... -args -env_gen_plugin="./bin/${plugin_directories[0]}/$PLUGIN_NAME" -sig_gen_plugin="./bin/${plugin_directories[1]}/$PLUGIN_NAME" |