Skip to content

Commit 5ceb3a6

Browse files
iTest: move generated artifacts into out/
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
1 parent e9dbfe2 commit 5ceb3a6

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*.iml
66

77
# ignoring all generated artifacts in integration tests
8-
integration/**/testdata/
9-
integration/**/cmd/
10-
!integration/nwo/cmd/
8+
integration/**/out/
119

1210
cmd/fsccli/cmd

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ clean: $(addprefix clean-,$(INTEGRATION_TARGETS)) ## Clean generated testdata
157157
rm -rf ./cmd/fsccli/cmd
158158

159159
$(addprefix clean-,$(INTEGRATION_TARGETS)) : clean-%:
160-
rm -rf ./integration/$(firstword $(subst -, ,$*))/$(subst $(firstword $(subst -, ,$*))-,,$*)/cmd
161-
rm -rf ./integration/$(firstword $(subst -, ,$*))/$(subst $(firstword $(subst -, ,$*))-,,$*)/testdata
160+
rm -rf ./integration/$(firstword $(subst -, ,$*))/$(subst $(firstword $(subst -, ,$*))-,,$*)/out
162161

163162
.PHONY: tidy
164163
tidy: ## Run go mod tidy everywhere

integration/fabric/atsachaincode/atsa_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type TestSuite struct {
4141

4242
func NewTestSuite(commType fsc.P2PCommunicationType, nodeOpts *integration.ReplicationOptions) *TestSuite {
4343
return &TestSuite{integration.NewTestSuite(func() (*integration.Infrastructure, error) {
44-
return integration.GenerateAt(StartPort(), "testdata", integration.WithRaceDetection, atsa.Topology(&fabricsdk.SDK{}, commType, nodeOpts)...)
44+
return integration.GenerateAt(StartPort(), "out/testdata", integration.WithRaceDetection, atsa.Topology(&fabricsdk.SDK{}, commType, nodeOpts)...)
4545
})}
4646
}
4747

integration/fabricx/iou/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
cmd
1+
out
22
my-topo

integration/nwo/cmd/artifactgen/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func NewCmd() *cobra.Command {
5656
}
5757
flags := genCmd.Flags()
5858
flags.StringVarP(&topologyFile, "topology", "t", "", "topology file in yaml format")
59-
flags.StringVarP(&output, "output", "o", "./testdata", "output folder")
59+
flags.StringVarP(&output, "output", "o", "./out/testdata", "output folder")
6060
flags.IntVarP(&port, "port", "p", 20000, "host starting port")
6161

6262
rootCommand.AddCommand(

integration/nwo/fsc/fsc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ func (p *Platform) NodeCmdDir(peer *node2.Replica) string {
714714
wd, err := os.Getwd()
715715
gomega.Expect(err).ToNot(gomega.HaveOccurred())
716716

717-
return filepath.Join(wd, "cmd", peer.Name)
717+
return filepath.Join(wd, "out", "cmd", peer.Name)
718718
}
719719

720720
func (p *Platform) NodeCmdPackage(peer *node2.Replica) string {
@@ -727,11 +727,11 @@ func (p *Platform) NodeCmdPackage(peer *node2.Replica) string {
727727
// both can be built from these paths
728728
if withoutGoPath := strings.TrimPrefix(wd, filepath.Join(gopath, "src")); withoutGoPath != wd {
729729
return strings.TrimPrefix(
730-
filepath.Join(withoutGoPath, "cmd", peer.Name),
730+
filepath.Join(withoutGoPath, "out", "cmd", peer.Name),
731731
string(filepath.Separator),
732732
)
733733
}
734-
return filepath.Join(wd, "cmd", peer.Name)
734+
return filepath.Join(wd, "out", "cmd", peer.Name)
735735
}
736736

737737
func (p *Platform) NodeCmdPath(peer *node2.Replica) string {

0 commit comments

Comments
 (0)