Skip to content

Porting legacy tests to new integration-test infra (part 1...) #2294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3e55331
Moved out from legacy some TryBuild* integration tests
cmaglie Sep 3, 2023
7e0899c
Ported sketch_with_config integration tests out of legacy
cmaglie Sep 2, 2023
8a62b12
Ported sketch_no_functions integration tests out of legacy
cmaglie Sep 2, 2023
b064f2a
Ported sketch_with_backup_files integration tests out of legacy
cmaglie Sep 2, 2023
8513196
Ported sketch_with_old_lib integration tests out of legacy
cmaglie Sep 2, 2023
f0c9848
Ported sketch_with_subfolders integration tests out of legacy
cmaglie Sep 2, 2023
4e582a4
Ported sketch_with_class integration tests out of legacy
cmaglie Sep 2, 2023
7597e88
Simplified integrationtest of preprocessor
cmaglie Sep 2, 2023
cce795e
Ported sketch_with_typename integration tests out of legacy
cmaglie Sep 2, 2023
e819701
Ported sketch_with_namespace integration tests out of legacy
cmaglie Sep 2, 2023
9e3a3fe
Ported sketch_with_default_args integration tests out of legacy
cmaglie Sep 3, 2023
3533da2
Ported sketch_with_inline_function_args integration tests out of legacy
cmaglie Sep 3, 2023
6c472c0
Ported sketch_with_function_signature_inside_ifdef integration tests …
cmaglie Sep 3, 2023
297235b
Ported sketch_with_usbcon integration tests out of legacy
cmaglie Sep 3, 2023
a3f2fa1
Ported sketch_with_const integration tests out of legacy
cmaglie Sep 3, 2023
fd7b7e1
Ported sketch_with_templates_and_shift integration tests out of legacy
cmaglie Sep 3, 2023
9d22542
Ported sketch eol_processing integration tests out of legacy
cmaglie Sep 3, 2023
d8f64de
Ported SketchWithIfdef integration tests out of legacy
cmaglie Sep 3, 2023
4cf01fa
Ported sketch_with_ifdef integration tests out of legacy
cmaglie Sep 3, 2023
3e96ac6
Ported Bridge integration tests out of legacy
cmaglie Sep 3, 2023
2fda19f
Ported more Bridge integration tests out of legacy
cmaglie Sep 3, 2023
ca21942
Ported even more Bridge integration tests out of legacy
cmaglie Sep 3, 2023
e447ba9
Better subtesting categorization
cmaglie Sep 3, 2023
3b354ad
Ported yet another Bridge integration tests out of legacy
cmaglie Sep 3, 2023
d66c875
Ported Balanduino integration tests out of legacy
cmaglie Sep 3, 2023
1866cd8
Ported CharWithEscapedDoubleQuote integration tests out of legacy
cmaglie Sep 3, 2023
c0941c0
Ported IncludeBetweenMultilineComment integration tests out of legacy
cmaglie Sep 3, 2023
f4f6f25
Ported LineContinuations integration tests out of legacy
cmaglie Sep 3, 2023
c5dc578
Ported StringWithComment integration tests out of legacy
cmaglie Sep 3, 2023
b73e411
Ported SketchWithStruct integration tests out of legacy
cmaglie Sep 3, 2023
1de6112
Ported SketchNoFunctionsTwoFiles integration tests out of legacy
cmaglie Sep 4, 2023
f88ee92
Ported SketchWithClassAndMethodSubstring integration tests out of legacy
cmaglie Sep 4, 2023
dac334e
Ported SketchThatChecksIfSPIHasTransactions integration tests out of …
cmaglie Sep 4, 2023
8bc29c7
Ported sketch_with_dependend_libraries integration tests out of legacy
cmaglie Sep 4, 2023
8f0a4ca
Ported sketch_with_function_pointer integration tests out of legacy
cmaglie Sep 4, 2023
180dba1
Ported sketch_usbhost integration tests out of legacy
cmaglie Sep 4, 2023
e4d2845
Removed sketch1 from try_build* test
cmaglie Sep 4, 2023
4500280
Ported sketch9 integration tests out of legacy
cmaglie Sep 4, 2023
c954899
Removing no more used functions
cmaglie Sep 4, 2023
0206ffc
Ported USBHost test
cmaglie Sep 4, 2023
a8f1d88
Removed no more useful test from legacy
cmaglie Sep 4, 2023
c4f9601
Removed no more needed tests
cmaglie Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ported sketch_with_backup_files integration tests out of legacy
  • Loading branch information
cmaglie committed Sep 4, 2023
commit b064f2ab273e8ebb7f9906d4120e5d647eae61db
10 changes: 9 additions & 1 deletion internal/integrationtest/compile_4/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestCompileOfProblematicSketches(t *testing.T) {
{"SketchWithNamespace", tryBuildAvrLeonardo},
{"SketchWithDefaultArgs", tryBuildAvrLeonardo},
{"SketchWithClass", tryBuildAvrLeonardo},
{"SketchWithBackupFiles", tryBuildAvrLeonardo},
{"SketchWithBackupFiles", testBuilderSketchWithBackupFiles},
{"SketchWithSubfolders", tryBuildAvrLeonardo},
}.Run(t, env, cli)
}
Expand Down Expand Up @@ -105,6 +105,14 @@ func testBuilderSketchWithoutFunctions(t *testing.T, env *integrationtest.Enviro
require.Contains(t, preprocessedSketch, "#include <Arduino.h>\n#line 1 "+quotedSketchMainFile+"\n")
}

func testBuilderSketchWithBackupFiles(t *testing.T, env *integrationtest.Environment, cli *integrationtest.ArduinoCLI) {
// Build
_, err := tryBuild(t, env, cli, "arduino:avr:leonardo")
require.NoError(t, err)
_, err = tryBuild(t, env, cli, "arduino:avr:uno")
require.NoError(t, err)
}

func tryBuildAvrLeonardo(t *testing.T, env *integrationtest.Environment, cli *integrationtest.ArduinoCLI) {
_, err := tryBuild(t, env, cli, "arduino:avr:leonardo")
require.NoError(t, err)
Expand Down
16 changes: 0 additions & 16 deletions legacy/builder/test/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,6 @@ func TestBuilderBridgeRedBearLab(t *testing.T) {
require.True(t, exist)
}

func TestBuilderSketchWithBackup(t *testing.T) {
ctx := &types.Context{
HardwareDirs: paths.NewPathList(filepath.Join("..", "hardware"), "downloaded_hardware", "downloaded_board_manager_stuff"),
BuiltInToolsDirs: paths.NewPathList("downloaded_tools", "downloaded_board_manager_stuff"),
BuiltInLibrariesDirs: paths.New("downloaded_libraries"),
OtherLibrariesDirs: paths.NewPathList("libraries"),
}
ctx = prepareBuilderTestContext(t, ctx, paths.New("sketch_with_backup_files", "sketch_with_backup_files.ino"), "arduino:avr:uno")
defer cleanUpBuilderTestContext(t, ctx)

// Run builder
command := builder.Builder{}
err := command.Run(ctx)
NoError(t, err)
}

func TestBuilderSketchWithOldLib(t *testing.T) {
ctx := prepareBuilderTestContext(t, nil, paths.New("sketch_with_old_lib", "sketch_with_old_lib.ino"), "arduino:avr:uno")
defer cleanUpBuilderTestContext(t, ctx)
Expand Down

This file was deleted.

This file was deleted.