Skip to content

Commit

Permalink
fix link (#2)
Browse files Browse the repository at this point in the history
* fix link

* and fix build

* more fixes

* Only generate tests in CI

* fix build

* move around targets in makefile
  • Loading branch information
awalterschulze authored Oct 22, 2024
1 parent 4dbee3a commit b019c9e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 31 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
with:
repository: gogo/protobuf
path: gopath/github.com/gogo/protobuf
- name: Checkout testsuite
uses: actions/checkout@v4
with:
repository: katydid/testsuite
path: gopath/github.com/katydid/testsuite
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand All @@ -44,12 +39,11 @@ jobs:
run: env && go env && pwd
- name: tree
run: tree
- name: Generate
run: |
cd gopath/github.com/katydid/testsuite
PATH=$HOME/bin:$PATH make regenerate
- name: Build
run: |
cd gopath/github.com/katydid/testsuite
make build
- name: Generate Tests
run: |
cd gopath/github.com/katydid/testsuite
PATH=$HOME/bin:$PATH make regenerate-tests
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gen-validator-tests
validator/tests/*
validator/benches/*
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
regenerate:
(cd validator && make regenerate)
build:
go build ./...

nuke:
(cd validator && make nuke)

regenerate-tests:
(cd validator && make regenerate-tests)

build:
(cd validator && go build ./...)
regenerate-all:
(cd validator && make regenerate)
4 changes: 3 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Cross Language Test Suite for Katydid

[![Build Status](/~https://github.com/katydid/testsuite/actions/workflows/build.yml/badge.svg)](/~https://github.com/katydid/testsuite/actions)

The test suite is a language agnostic test suite.

The idea is that katydid can be implemented in multiple programming languages.
Currently an implementations are available in:

- [Go](/~https://github.com/katydid/katydid) and
- [Go](/~https://github.com/katydid/validator-go) and
- [Haskell](/~https://github.com/katydid/katydid-haskell).

Having one set of tests that can be used by multiple implementations helps to keep these implementations consistent
Expand Down
9 changes: 9 additions & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build tools
// +build tools

// tools is a dummy package that will be ignored for builds, but included for dependencies
package tools

import (
_ "github.com/gogo/protobuf/protoc-gen-gogo"
)
16 changes: 8 additions & 8 deletions validator/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
regenerate:
regenerate-tests:
make nuke-tests
(cd gen-validator-tests && make regenerate && go install .)
gen-validator-tests -seed 12345

regenerate-all:
make nuke
(cd gen-validator-tests && make regenerate && go install .)
gen-validator-tests -seed 12345 -benches .

regenerate-tests:
nuke:
make nuke-tests
(cd gen-validator-tests && make regenerate && go install .)
gen-validator-tests
make nuke-benches

nuke-tests:
rm -rf ./tests/ || true

nuke-benches:
rm -rf ./benches/ || true

nuke:
make nuke-tests
make nuke-benches
16 changes: 8 additions & 8 deletions validator/gen-validator-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ gofmt:
gofmt -l -s -w .

regenerate:
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf person.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf srctree.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf treeregister.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf typewriterprison.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf puddingmilkshake.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf topsyturvy.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf knot.proto)
(protoc --gogo_out=. -I=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf banana.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf person.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf srctree.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf treeregister.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf typewriterprison.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf puddingmilkshake.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf topsyturvy.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf knot.proto)
(protoc --gogo_out=. -I=.:../../../../../:../../../../../github.com/gogo/protobuf/protobuf banana.proto)
find . -name "*.pb.go" | xargs gofmt -l -s -w

0 comments on commit b019c9e

Please sign in to comment.