-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test.sh tests both CDDL and no splits
- Loading branch information
Maksim Sadym
committed
Dec 5, 2022
1 parent
89f7aea
commit 97fcc31
Showing
3 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#! /bin/bash | ||
set -ex | ||
|
||
SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P) | ||
ROOT=$(dirname $SCRIPT_DIR) | ||
|
||
if ! [ -x "$(command -v cddl)" ] || [ "$1" = "--upgrade" ]; then | ||
echo 'Installing cddl' | ||
cargo install cddl | ||
fi | ||
|
||
if [[ "$(npm list parse5)" =~ "empty" ]] || [ "$1" = "--upgrade" ]; then | ||
echo 'Installing npm package parse5' | ||
npm install parse5 | ||
fi | ||
|
||
# Extract CDDL content from spec into files | ||
$ROOT/scripts/cddl/generate.js | ||
|
||
cddl compile-cddl --cddl local.cddl | ||
cddl compile-cddl --cddl remote.cddl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters