Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail committed Dec 24, 2024
1 parent 85585f2 commit ecd7ce3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/ci/run_x509_limbo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source tests/ci/common_posix_setup.sh
# Subsequent follow-up PRs will wire this up into a new CodeBuild project and handle producing and tracking
# the reports.

SCRATCH_DIR="${SRC_ROOT}/scratch"
SCRATCH_DIR="${SYS_ROOT}/scratch"
X509_CI_DIR="${SRC_ROOT}/tests/ci/x509"
X509_LIMBO_SRC="${SCRATCH_DIR}/x509-limbo"

Expand Down
19 changes: 9 additions & 10 deletions tests/ci/x509/limbo-report/annotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sort"
)

var annotateHelpDoc string = `report annotate [-csv] -limbo <limboFile> <resultFile>
var annotateHelpDoc string = `report annotate [-csv] <limboFile> <resultFile>
Annotates a standard x509-limbo results file with information from the provided <limboFile> test descriptors.
By default this will write the result back to the process standard output.
Expand All @@ -24,13 +24,11 @@ Options:
`

var annotateCommand struct {
limboFilePath string
formatAsCsv bool
formatAsCsv bool
}

var annotateFlagSet = func() *flag.FlagSet {
fs := flag.NewFlagSet("annotate", flag.ExitOnError)
fs.StringVar(&annotateCommand.limboFilePath, "limbo", "limbo.json", "location of the limbo test cases")
fs.BoolVar(&annotateCommand.formatAsCsv, "csv", false, "format output as csv rather then the default")
fs.Usage = func() {
fmt.Fprint(fs.Output(), annotateHelpDoc)
Expand All @@ -43,16 +41,17 @@ func runAnnotateCommand(args []string) error {
if err := annotateFlagSet.Parse(args); err != nil {
return err
}
limbo, err := parseLimboFile(annotateCommand.limboFilePath)
if err != nil {
return err

if len(annotateFlagSet.Args()) != 2 {
return fmt.Errorf("expect two positional arguments")
}

if len(annotateFlagSet.Args()) != 1 {
return fmt.Errorf("expect one positional argument for the result file name")
limbo, err := parseLimboFile(annotateFlagSet.Arg(0))
if err != nil {
return err
}

harnessFilePath := annotateFlagSet.Arg(0)
harnessFilePath := annotateFlagSet.Arg(1)
harnessBytes, err := os.ReadFile(harnessFilePath)
if err != nil {
log.Fatalf("failed to read harnessFile(%v): %v", harnessFilePath, err)
Expand Down
2 changes: 1 addition & 1 deletion tests/ci/x509/x509-limbo.patch
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ index 0000000..2305b42
+
+.PHONY: verify-aws-lc-source
+verify-aws-lc-source:
+ @if [[ -z "${AWS_LC_SRC_DIR}" ]]; then \
+ @if [ test -z "${AWS_LC_SRC_DIR}" ]; then \
+ echo "AWS_LC_SRC_DIR environment variable is missing and is required to specify AWS-LC source location" && false; \
+ fi
+
Expand Down

0 comments on commit ecd7ce3

Please sign in to comment.