From 4589f9f0bd9d0f8c86ce76f8a1916f6e9e8509af Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Tue, 9 Jul 2019 12:48:12 +0200 Subject: [PATCH] Move all damlc tests to compiler/damlc/tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ve also changed some of the names to be more sensible. --- .gitignore | 1 + compiler/damlc/BUILD.bazel | 228 ------------------ compiler/damlc/README.md | 18 +- compiler/damlc/daml-doc/BUILD.bazel | 2 +- .../test/DA/Daml/GHC/Damldoc/Tests.hs | 2 +- compiler/damlc/daml-ide-core/BUILD.bazel | 2 +- compiler/damlc/tests/BUILD.bazel | 221 +++++++++++++++++ .../damlc/{ => tests}/bond-trading/Bond.daml | 0 .../damlc/{ => tests}/bond-trading/Cash.daml | 0 .../damlc/{ => tests}/bond-trading/Dvp.daml | 0 .../bond-trading/DvpNotification.daml | 0 .../{ => tests}/bond-trading/DvpTerms.daml | 0 .../{ => tests}/bond-trading/Helper.daml | 0 .../damlc/{ => tests}/bond-trading/Setup.daml | 0 .../damlc/{ => tests}/bond-trading/Test.daml | 0 .../daml-test-files}/ActionFail.daml | 0 .../daml-test-files}/AliasCompression.daml | 0 .../daml-test-files}/AliasNonLocal.daml | 0 .../daml-test-files}/AmbiguousDataType.daml | 0 .../daml-test-files}/Bad.daml | 0 .../daml-test-files}/BadCodePoint.daml | 0 .../daml-test-files}/BadUTF8.daml | 0 .../Choice_no_params_template.daml | 0 .../Choice_superfluous_with.daml | 0 .../daml-test-files}/CoerceContractId.daml | 0 .../daml-test-files}/Collision.daml | 0 .../daml-test-files}/ComposedKey.daml | 0 .../daml-test-files}/Conjunction.daml | 0 .../daml-test-files}/Constraint.daml | 0 .../daml-test-files}/ConstraintBad.daml | 0 .../daml-test-files}/ConsumingTests.daml | 0 .../daml-test-files}/ContractKeys.daml | 0 .../daml-test-files}/CustomOptional.daml | 0 .../daml-test-files}/Cyclic.daml | 0 .../daml-test-files}/DataRecursion.daml | 0 .../daml-test-files}/DataTypes.daml | 0 .../daml-test-files}/DefaultMethods.daml | 0 .../daml-test-files}/Deriving.daml | 0 .../daml-test-files}/DesugarWarnings.daml | 0 .../daml-test-files}/DisjunctionChoices.daml | 0 .../daml-test-files}/Divulgence.daml | 0 .../daml-test-files}/Either.daml | 0 .../daml-test-files}/Empty.daml | 0 .../daml-test-files}/EmptyWith.daml | 0 .../daml-test-files}/Enum.daml | 0 .../daml-test-files}/EnumFromThenTo.daml | 0 .../daml-test-files}/EnumLF.daml | 0 .../daml-test-files}/EqContractId.daml | 0 .../daml-test-files}/EqPoly.daml | 0 .../daml-test-files}/ErrorsWithColons.daml | 0 .../daml-test-files}/Examples.daml | 0 .../ExerciseWithoutActors.daml | 0 .../daml-test-files}/Existential.daml | 0 .../daml-test-files}/ExistentialSum.daml | 0 .../daml-test-files}/Fib.daml | 0 .../daml-test-files}/FunRetTypeSig.daml | 0 .../daml-test-files}/GenTemplCompat.daml | 0 .../daml-test-files}/GenericTemplates.daml | 0 .../daml-test-files}/Generics.daml | 0 .../daml-test-files}/GetParty.daml | 0 .../daml-test-files}/GetPartyError.daml | 0 .../daml-test-files}/Good.daml | 0 .../daml-test-files}/GoodCodePoints.daml | 0 .../daml-test-files}/Hack.daml | 0 .../daml-test-files}/HelloWorld.daml | 0 .../daml-test-files}/Import.daml | 0 .../daml-test-files}/IntBoundsDynamic.daml | 0 .../daml-test-files}/IntBoundsLower.daml | 0 .../daml-test-files}/IntBoundsUpper.daml | 0 .../daml-test-files}/InternalImport.daml | 0 .../InternedExternalRefs.daml | 0 .../daml-test-files}/Iou12.daml | 0 .../daml-test-files}/IouDSL.daml | 0 .../daml-test-files}/Iou_new.daml | 0 .../daml-test-files}/Iou_template.EXPECTED.md | 0 .../Iou_template.EXPECTED.rst | 0 .../daml-test-files}/Iou_template.daml | 0 .../daml-test-files}/Isomorphism.daml | 0 .../daml-test-files}/IsomorphismFail.daml | 0 .../daml-test-files}/Lazy.daml | 0 .../daml-test-files}/List.daml | 0 .../daml-test-files}/ListComprehension.daml | 0 .../daml-test-files}/ListEq.daml | 0 .../daml-test-files}/LogicTest.daml | 0 .../daml-test-files}/Main.daml | 0 .../daml-test-files}/Map.daml | 0 .../daml-test-files}/Math.daml | 0 .../daml-test-files}/MaybeCompat.daml | 0 .../daml-test-files}/MissingFields.daml | 0 .../daml-test-files}/MissingVersion.daml | 0 .../daml-test-files}/ModuleName.daml | 0 .../daml-test-files}/MonoidTest.daml | 0 .../daml-test-files}/MultipleFields.daml | 0 .../daml-test-files}/NO_AUTO_COPYRIGHT | 0 .../daml-test-files}/Nat.daml | 0 .../daml-test-files}/Newtype.daml | 0 .../daml-test-files}/NewtypeDerive.daml | 0 .../daml-test-files}/NewtypeHigherKinded.daml | 0 .../daml-test-files}/NewtypeNested.daml | 0 .../daml-test-files}/NewtypePolymorphic.daml | 0 .../daml-test-files}/NoCaseOfCase.daml | 0 .../daml-test-files}/NoControllerAsVar.daml | 0 .../daml-test-files}/No_concat_clash.daml | 0 .../daml-test-files}/NonEmpty.daml | 0 .../daml-test-files}/NumericUnderscore.daml | 0 .../daml-test-files}/Optional.daml | 0 .../daml-test-files}/Optional_Total.daml | 0 .../daml-test-files}/OrdOptional.daml | 0 .../daml-test-files}/Otherwise.daml | 0 .../daml-test-files}/PartyCompare.daml | 0 .../daml-test-files}/PartyVsText.daml | 0 .../daml-test-files}/PatError.daml | 0 .../daml-test-files}/PatternSynonyms.daml | 0 .../daml-test-files}/Phantom.daml | 0 .../daml-test-files}/PolymorphicTest.daml | 0 .../daml-test-files}/Precondition.daml | 0 .../daml-test-files}/PreludeTest.daml | 0 .../daml-test-files}/Profunctor.daml | 0 .../daml-test-files}/ProposalDSL.daml | 0 .../daml-test-files}/QualifiedPrelude.daml | 0 .../daml-test-files}/Random.daml | 0 .../daml-test-files}/Rank2.daml | 0 .../RationalLowerBoundError.daml | 0 .../RationalLowerBoundMax.daml | 0 .../RationalPrecisionMax.daml | 0 .../RationalPrecisionUpperBoundError.daml | 0 .../RationalUpperBoundError.daml | 0 .../RationalUpperBoundMax.daml | 0 .../daml-test-files}/RecordBig.daml | 0 .../daml-test-files}/RecordUpdate.daml | 0 .../daml-test-files}/Records.daml | 0 .../RelTimeDetailsHidden1.daml | 0 .../RelTimeDetailsHidden2.daml | 0 .../daml-test-files}/RightOfUse.daml | 0 .../daml-test-files}/SameNameConstructor.daml | 0 .../ScenarioReturningUpdate.daml | 0 .../daml-test-files}/Self.daml | 0 .../daml-test-files}/Self2.daml | 0 .../daml-test-files}/SemigroupTest.daml | 0 .../SerializableAnnotation.daml | 0 .../SerializableAnnotation/Imported.daml | 0 .../SerializablePolymorphicContractId.daml | 0 .../daml-test-files}/Set.daml | 0 .../daml-test-files}/Sha256.daml | 0 .../daml-test-files}/ShortCircuit.daml | 0 .../daml-test-files}/Show.daml | 0 .../daml-test-files}/Simple.daml | 0 .../daml-test-files}/Stdlib.daml | 0 .../daml-test-files}/Subdir/Examples.daml | 0 .../daml-test-files}/SubmitFail.daml | 0 .../SubmitterInMaintainers_after_1866.daml | 0 .../SubmitterInMaintainers_before_1866.daml | 0 .../daml-test-files}/SugarUnit.daml | 0 .../daml-test-files}/SumProducts.daml | 0 .../daml-test-files}/Symbol.daml | 0 .../daml-test-files}/Text.daml | 0 .../daml-test-files}/TextEq.daml | 0 .../daml-test-files}/TextMap.daml | 0 .../daml-test-files}/Trace.daml | 0 .../daml-test-files}/Tuple.daml | 0 .../daml-test-files}/TypeFamily.daml | 0 .../daml-test-files}/TypeVarShadowing.daml | 0 .../daml-test-files}/Unicode.daml | 0 .../daml-test-files}/Unserializable.daml | 0 .../daml-test-files}/UnusedLet.daml | 0 .../daml-test-files}/UseInteger.daml | 0 .../daml-test-files}/Validation.daml | 0 .../daml-test-files}/ValueRecursion.daml | 0 .../daml-test-files}/Warnings.daml | 0 .../ide/ImportErrors/ImportNotFound.daml | 0 .../ImportErrors/ImportingImportNotFound.daml | 0 .../daml-test-files}/ide/Qualified/Bad.daml | 0 .../daml-test-files}/ide/Qualified/Good.daml | 0 .../ide/Qualified/Import.daml | 0 .../daml-test-files}/ide/README.md | 0 .../daml-test-files}/ide/RecursiveImport.daml | 0 .../daml-test-files}/ide/warning_tab.daml | 0 .../{cli-tests => tests/src}/CliParser.hs | 0 .../src/DA/Test/DamlcIntegration.hs} | 8 +- .../src}/DA/Test/GenerateModuleTree.hs | 0 .../src}/DA/Test/ShakeIdeClient.hs | 0 .../src}/DA/Test/TastyMain.hs | 0 .../{cli-tests => tests/src}/DamlcTest.hs | 0 .../{cli-tests => tests/src}/DamlcVisual.hs | 4 +- .../src}/daml-ghc-deterministic.sh | 7 +- compiler/damlc/{ => tests}/util.bzl | 16 +- .../{cli-tests => tests}/visual/Basic.daml | 0 .../{cli-tests => tests}/visual/Basic.dot | 0 compiler/lsp-tests/BUILD.bazel | 2 +- .../test-utils/BUILD.bazel | 0 .../test-utils/DA/Test/Util.hs | 0 191 files changed, 249 insertions(+), 262 deletions(-) create mode 100644 compiler/damlc/tests/BUILD.bazel rename compiler/damlc/{ => tests}/bond-trading/Bond.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/Cash.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/Dvp.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/DvpNotification.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/DvpTerms.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/Helper.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/Setup.daml (100%) rename compiler/damlc/{ => tests}/bond-trading/Test.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ActionFail.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/AliasCompression.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/AliasNonLocal.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/AmbiguousDataType.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Bad.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/BadCodePoint.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/BadUTF8.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Choice_no_params_template.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Choice_superfluous_with.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/CoerceContractId.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Collision.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ComposedKey.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Conjunction.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Constraint.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ConstraintBad.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ConsumingTests.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ContractKeys.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/CustomOptional.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Cyclic.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/DataRecursion.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/DataTypes.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/DefaultMethods.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Deriving.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/DesugarWarnings.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/DisjunctionChoices.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Divulgence.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Either.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Empty.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/EmptyWith.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Enum.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/EnumFromThenTo.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/EnumLF.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/EqContractId.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/EqPoly.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ErrorsWithColons.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Examples.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ExerciseWithoutActors.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Existential.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ExistentialSum.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Fib.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/FunRetTypeSig.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/GenTemplCompat.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/GenericTemplates.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Generics.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/GetParty.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/GetPartyError.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Good.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/GoodCodePoints.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Hack.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/HelloWorld.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Import.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/IntBoundsDynamic.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/IntBoundsLower.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/IntBoundsUpper.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/InternalImport.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/InternedExternalRefs.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Iou12.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/IouDSL.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Iou_new.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Iou_template.EXPECTED.md (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Iou_template.EXPECTED.rst (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Iou_template.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Isomorphism.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/IsomorphismFail.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Lazy.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/List.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ListComprehension.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ListEq.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/LogicTest.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Main.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Map.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Math.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/MaybeCompat.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/MissingFields.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/MissingVersion.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ModuleName.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/MonoidTest.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/MultipleFields.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NO_AUTO_COPYRIGHT (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Nat.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Newtype.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NewtypeDerive.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NewtypeHigherKinded.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NewtypeNested.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NewtypePolymorphic.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NoCaseOfCase.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NoControllerAsVar.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/No_concat_clash.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NonEmpty.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/NumericUnderscore.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Optional.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Optional_Total.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/OrdOptional.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Otherwise.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PartyCompare.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PartyVsText.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PatError.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PatternSynonyms.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Phantom.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PolymorphicTest.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Precondition.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/PreludeTest.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Profunctor.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ProposalDSL.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/QualifiedPrelude.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Random.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Rank2.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalLowerBoundError.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalLowerBoundMax.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalPrecisionMax.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalPrecisionUpperBoundError.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalUpperBoundError.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RationalUpperBoundMax.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RecordBig.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RecordUpdate.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Records.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RelTimeDetailsHidden1.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RelTimeDetailsHidden2.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/RightOfUse.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SameNameConstructor.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ScenarioReturningUpdate.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Self.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Self2.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SemigroupTest.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SerializableAnnotation.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SerializableAnnotation/Imported.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SerializablePolymorphicContractId.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Set.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Sha256.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ShortCircuit.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Show.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Simple.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Stdlib.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Subdir/Examples.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SubmitFail.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SubmitterInMaintainers_after_1866.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SubmitterInMaintainers_before_1866.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SugarUnit.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/SumProducts.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Symbol.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Text.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/TextEq.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/TextMap.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Trace.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Tuple.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/TypeFamily.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/TypeVarShadowing.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Unicode.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Unserializable.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/UnusedLet.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/UseInteger.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Validation.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ValueRecursion.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/Warnings.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/ImportErrors/ImportNotFound.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/ImportErrors/ImportingImportNotFound.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/Qualified/Bad.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/Qualified/Good.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/Qualified/Import.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/README.md (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/RecursiveImport.daml (100%) rename compiler/damlc/{test-files => tests/daml-test-files}/ide/warning_tab.daml (100%) rename compiler/damlc/{cli-tests => tests/src}/CliParser.hs (100%) rename compiler/damlc/{test-src/DA/Test/GHC.hs => tests/src/DA/Test/DamlcIntegration.hs} (99%) rename compiler/damlc/{test-src => tests/src}/DA/Test/GenerateModuleTree.hs (100%) rename compiler/damlc/{test-src => tests/src}/DA/Test/ShakeIdeClient.hs (100%) rename compiler/damlc/{test-src => tests/src}/DA/Test/TastyMain.hs (100%) rename compiler/damlc/{cli-tests => tests/src}/DamlcTest.hs (100%) rename compiler/damlc/{cli-tests => tests/src}/DamlcVisual.hs (92%) rename compiler/damlc/{test-files => tests/src}/daml-ghc-deterministic.sh (93%) rename compiler/damlc/{ => tests}/util.bzl (90%) rename compiler/damlc/{cli-tests => tests}/visual/Basic.daml (100%) rename compiler/damlc/{cli-tests => tests}/visual/Basic.dot (100%) rename {compiler/damlc => libs-haskell}/test-utils/BUILD.bazel (100%) rename {compiler/damlc => libs-haskell}/test-utils/DA/Test/Util.hs (100%) diff --git a/.gitignore b/.gitignore index e5b0a85b6925..8096a1cd6c95 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ daml-lf/project daml-lf/gen daml-lf/build.sbt .markdown-preview.html +compiler/damlc/output \ No newline at end of file diff --git a/compiler/damlc/BUILD.bazel b/compiler/damlc/BUILD.bazel index 77183d1a20a3..e25eee0d6f92 100644 --- a/compiler/damlc/BUILD.bazel +++ b/compiler/damlc/BUILD.bazel @@ -145,79 +145,6 @@ da_haskell_library( ], ) -# Tests for the lax CLI parser -da_haskell_test( - name = "damlc-cliparser-test", - srcs = ["cli-tests/CliParser.hs"], - hazel_deps = [ - "tasty", - "base", - "optparse-applicative", - "tasty-hunit", - ], - main_function = "Cli.main", - src_strip_prefix = "tests", - visibility = ["//visibility:private"], - deps = [ - ":damlc-lib", - ], -) - -# Tests for damlc visual -da_haskell_test( - name = "damlc-visual-test", - srcs = ["cli-tests/DamlcVisual.hs"], - data = [ - ":cli-tests/visual/Basic.dot", - ":visual-test-daml.dar", - ], - hazel_deps = [ - "tasty", - "base", - "extra", - "filepath", - "tasty-golden", - ], - main_function = "VisualTest.main", - src_strip_prefix = "tests", - visibility = ["//visibility:private"], - deps = [ - ":damlc-lib", - "//libs-haskell/bazel-runfiles", - ], -) - -# Test file used in damlc-visual-test -daml_compile( - name = "visual-test-daml", - main_src = "cli-tests/visual/Basic.daml", -) - -# Tests for damlc test -da_haskell_test( - name = "damlc-test-test", - srcs = ["cli-tests/DamlcTest.hs"], - data = [ - "//compiler/damlc/pkg-db", - "//compiler/scenario-service/server:scenario_service_jar", - ], - hazel_deps = [ - "base", - "extra", - "tasty", - "tasty-hunit", - ], - main_function = "DamlcTest.main", - src_strip_prefix = "tests", - visibility = ["//visibility:private"], - deps = [ - ":damlc-lib", - "//compiler/damlc/daml-opts:daml-opts-types", - "//compiler/hie-core", - "//libs-haskell/da-hs-base", - ], -) - # Generating DAML stdlib docs. filegroup( @@ -264,158 +191,3 @@ genrule( tools = ["//compiler/damlc"], visibility = ["//visibility:public"], ) - -load( - ":util.bzl", - "daml_ghc_compile_test", - "daml_ghc_integration_test", -) -load("@os_info//:os_info.bzl", "is_windows") - -# Runs the tests with all non-dev DAML-LF versions -daml_ghc_integration_test("daml-ghc-test-stable", "DA.Test.GHC.mainAll") - -# Runs the tests with DAML-LF 1.dev -daml_ghc_integration_test("daml-ghc-test-dev", "DA.Test.GHC.main") - -da_haskell_test( - name = "tasty-test", - srcs = ["test-src/DA/Test/TastyMain.hs"], - data = [ - ":test-files", - "//compiler/damlc/pkg-db", - ], - hazel_deps = [ - "base", - "tasty-hunit", - "text", - ], - main_function = "DA.Test.TastyMain.main", - src_strip_prefix = "test-src", - visibility = ["//visibility:public"], - deps = [ - "//compiler/damlc:damlc-lib", - "//compiler/damlc/daml-doc:daml-doc-testing", - "//libs-haskell/da-hs-base", - ], -) - -da_haskell_test( - name = "damlc-shake-tests", - size = "large", - # this test takes a while and often time out -- tell that to bazel - timeout = "long", - srcs = ["test-src/DA/Test/ShakeIdeClient.hs"], - data = [ - "//compiler/damlc/pkg-db", - "//compiler/scenario-service/server:scenario_service_jar", - ], - hazel_deps = [ - "base", - "directory", - "tasty-hunit", - "text", - ], - main_function = "DA.Test.ShakeIdeClient.main", - src_strip_prefix = "test-src", - visibility = ["//visibility:public"], - deps = [ - "//compiler/damlc/daml-compiler", - "//compiler/damlc/daml-ide-core", - "//compiler/damlc/daml-ide-core:ide-testing", - "//compiler/hie-core", - "//libs-haskell/da-hs-base", - ], -) - -da_haskell_binary( - name = "generate-module-tree", - srcs = ["test-src/DA/Test/GenerateModuleTree.hs"], - hazel_deps = [ - "base", - "filepath", - ], - main_function = "DA.Test.GenerateModuleTree.main", - src_strip_prefix = "test-src", - deps = ["//libs-haskell/da-hs-base"], -) - -genrule( - name = "module-tree-test", - outs = ["FatTree{i}.daml".format(i = i) for i in range(1, 19)], - cmd = "$(location :generate-module-tree) $(@D) 18", - tools = [":generate-module-tree"], - visibility = ["//visibility:public"], -) - -daml_ghc_compile_test( - name = "module-tree-memory", - srcs = [":module-tree-test"], - main = "FatTree18.daml", - visibility = ["//visibility:public"], -) - -daml_ghc_compile_test( - name = "compile-subdir", - srcs = [":test-files"], - main = "test-files/Subdir/Examples.daml", -) - -daml_ghc_compile_test( - name = "compile-empty", - srcs = [":test-files"], - main = "test-files/Empty.daml", -) - -daml_ghc_compile_test( - name = "examples-memory", - srcs = [":test-files"], - heap_limit = "200M", - main = "test-files/Examples.daml", - stack_limit = "230K", -) - -daml_ghc_compile_test( - name = "bond-trading-memory", - srcs = [":bond-trading"], - heap_limit = "200M" if is_windows else "100M", - main = "bond-trading/Test.daml", - stack_limit = "35K", -) - -filegroup( - name = "test-files", - srcs = glob(["test-files/**"]), - visibility = [ - "__pkg__", - "//daml-foundations/integration-tests:__pkg__", - ], -) - -filegroup( - name = "bond-trading", - srcs = glob(["bond-trading/**"]), - visibility = [ - "__pkg__", - "//daml-foundations/integration-tests:__pkg__", - ], -) - -# Check that DAML compilation is deterministic. -sh_test( - name = "daml-ghc-deterministic", - srcs = ["test-files/daml-ghc-deterministic.sh"], - args = [ - "$(location //compiler/damlc)", - "$(location @com_google_protobuf//:protoc)", - ], - data = [ - ":test-files", - "//compiler/damlc", - "//compiler/damlc/pkg-db", - "@com_google_protobuf//:protoc", - ], - deps = [ - "@bazel_tools//tools/bash/runfiles", - ], -) diff --git a/compiler/damlc/README.md b/compiler/damlc/README.md index 23951aa3a8aa..54f0183d738c 100644 --- a/compiler/damlc/README.md +++ b/compiler/damlc/README.md @@ -1,31 +1,23 @@ ## Developing -Before you start, build the IDE test suite. We fall back to this to -find runfiles such as the scenario service and the package database -when we’re running inside GHCi. - -``` -bazel build //compiler/damlc:damlc-shake-tests -``` - When working on the compiler: ``` -da-ghcid //compiler/damlc:daml-ghc-test-dev --reload=compiler/damlc/test-files --test=":main --pattern=" -bazel run //compiler/damlc:daml-ghc-test-dev -- --pattern= +da-ghcid //compiler/damlc/tests:integration-dev --reload=compiler/damlc/tests/daml-test-files --test=":main --pattern=" +bazel run //compiler/damlc/tests:integration-dev -- --pattern= bazel run damlc -- compile $PWD/MyDaml12File.daml ``` When working on the IDE via the test suite: ``` -bazel run //compiler/damlc:damlc-shake-tests -- --pattern= -da-ghcid //compiler/damlc:damlc-shake-tests --test=":main --pattern=" +bazel run //compiler/damlc/tests:shake -- --pattern= +da-ghcid //compiler/damlc/tests:shake --test=":main --pattern=" ``` The above commands do not execute scenarios. To do that, use a command like ``` -bazel run damlc test $PWD/compiler/damlc/bond-trading/Test.daml +bazel run damlc test $PWD/compiler/damlc/tests/bond-trading/Test.daml ``` At the moment, commands relying on ghc-pkg, e.g., `damlc build` do not diff --git a/compiler/damlc/daml-doc/BUILD.bazel b/compiler/damlc/daml-doc/BUILD.bazel index c4f48b08111f..7a6c4189a115 100644 --- a/compiler/damlc/daml-doc/BUILD.bazel +++ b/compiler/damlc/daml-doc/BUILD.bazel @@ -60,10 +60,10 @@ da_haskell_library( "//compiler/damlc/daml-doc", "//compiler/damlc/daml-opts", "//compiler/damlc/daml-opts:daml-opts-types", - "//compiler/damlc/test-utils", "//compiler/hie-core", "//libs-haskell/bazel-runfiles", "//libs-haskell/da-hs-base", + "//libs-haskell/test-utils", ], ) diff --git a/compiler/damlc/daml-doc/test/DA/Daml/GHC/Damldoc/Tests.hs b/compiler/damlc/daml-doc/test/DA/Daml/GHC/Damldoc/Tests.hs index d5480063c501..d9e01afbf8e9 100644 --- a/compiler/damlc/daml-doc/test/DA/Daml/GHC/Damldoc/Tests.hs +++ b/compiler/damlc/daml-doc/test/DA/Daml/GHC/Damldoc/Tests.hs @@ -34,7 +34,7 @@ import Data.Maybe mkTestTree :: IO Tasty.TestTree mkTestTree = do - testDir <- locateRunfiles $ mainWorkspace "compiler/damlc/test-files" + testDir <- locateRunfiles $ mainWorkspace "compiler/damlc/tests/daml-test-files" let isExpectationFile filePath = ".EXPECTED" == takeExtensions (dropExtension filePath) diff --git a/compiler/damlc/daml-ide-core/BUILD.bazel b/compiler/damlc/daml-ide-core/BUILD.bazel index a0168c140b6d..519c60660257 100644 --- a/compiler/damlc/daml-ide-core/BUILD.bazel +++ b/compiler/damlc/daml-ide-core/BUILD.bazel @@ -79,7 +79,7 @@ da_haskell_library( "//compiler/damlc/daml-compiler", "//compiler/damlc/daml-opts", "//compiler/damlc/daml-opts:daml-opts-types", - "//compiler/damlc/test-utils", "//compiler/hie-core", + "//libs-haskell/test-utils", ], ) diff --git a/compiler/damlc/tests/BUILD.bazel b/compiler/damlc/tests/BUILD.bazel new file mode 100644 index 000000000000..a71f71df0476 --- /dev/null +++ b/compiler/damlc/tests/BUILD.bazel @@ -0,0 +1,221 @@ +# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_test") +load("//rules_daml:daml.bzl", "daml_compile") +load("@os_info//:os_info.bzl", "is_windows") +load(":util.bzl", "damlc_compile_test", "damlc_integration_test") + +# Tests for the lax CLI parser +da_haskell_test( + name = "damlc-cliparser", + srcs = ["src/CliParser.hs"], + hazel_deps = [ + "tasty", + "base", + "optparse-applicative", + "tasty-hunit", + ], + main_function = "Cli.main", + src_strip_prefix = "tests", + visibility = ["//visibility:private"], + deps = [ + "//compiler/damlc:damlc-lib", + ], +) + +# Tests for damlc visual +da_haskell_test( + name = "damlc-visual", + srcs = ["src/DamlcVisual.hs"], + data = [ + ":visual-test-daml.dar", + ":visual/Basic.dot", + ], + hazel_deps = [ + "tasty", + "base", + "extra", + "filepath", + "tasty-golden", + ], + main_function = "VisualTest.main", + src_strip_prefix = "tests", + visibility = ["//visibility:private"], + deps = [ + "//compiler/damlc:damlc-lib", + "//libs-haskell/bazel-runfiles", + ], +) + +# Test file used in damlc-visual-test +daml_compile( + name = "visual-test-daml", + main_src = "visual/Basic.daml", +) + +# Tests for damlc test +da_haskell_test( + name = "damlc-test", + srcs = ["src/DamlcTest.hs"], + data = [ + "//compiler/damlc/pkg-db", + "//compiler/scenario-service/server:scenario_service_jar", + ], + hazel_deps = [ + "base", + "extra", + "tasty", + "tasty-hunit", + ], + main_function = "DamlcTest.main", + src_strip_prefix = "tests", + visibility = ["//visibility:private"], + deps = [ + "//compiler/damlc:damlc-lib", + "//compiler/damlc/daml-opts:daml-opts-types", + "//compiler/hie-core", + "//libs-haskell/da-hs-base", + ], +) + +# Integration tests for all non-dev DAML-LF versions +damlc_integration_test("integration-stable", "DA.Test.DamlcIntegration.mainAll") + +# Integration tests for DAML-LF 1.dev +damlc_integration_test("integration-dev", "DA.Test.DamlcIntegration.main") + +# Tests for daml-doc +da_haskell_test( + name = "daml-doc", + srcs = ["src/DA/Test/TastyMain.hs"], + data = [ + ":daml-test-files", + "//compiler/damlc/pkg-db", + ], + hazel_deps = [ + "base", + "tasty-hunit", + "text", + ], + main_function = "DA.Test.TastyMain.main", + src_strip_prefix = "src", + visibility = ["//visibility:public"], + deps = [ + "//compiler/damlc:damlc-lib", + "//compiler/damlc/daml-doc:daml-doc-testing", + "//libs-haskell/da-hs-base", + ], +) + +# Tests of damlc at the Shake API layer +da_haskell_test( + name = "shake", + size = "large", + # this test takes a while and often time out -- tell that to bazel + timeout = "long", + srcs = ["src/DA/Test/ShakeIdeClient.hs"], + data = [ + "//compiler/damlc/pkg-db", + "//compiler/scenario-service/server:scenario_service_jar", + ], + hazel_deps = [ + "base", + "directory", + "tasty-hunit", + "text", + ], + main_function = "DA.Test.ShakeIdeClient.main", + src_strip_prefix = "src", + visibility = ["//visibility:public"], + deps = [ + "//compiler/damlc/daml-compiler", + "//compiler/damlc/daml-ide-core", + "//compiler/damlc/daml-ide-core:ide-testing", + "//compiler/hie-core", + "//libs-haskell/da-hs-base", + ], +) + +# Memory tests + +da_haskell_binary( + name = "generate-module-tree", + srcs = ["src/DA/Test/GenerateModuleTree.hs"], + hazel_deps = [ + "base", + "filepath", + ], + main_function = "DA.Test.GenerateModuleTree.main", + src_strip_prefix = "src", + deps = ["//libs-haskell/da-hs-base"], +) + +genrule( + name = "module-tree-test", + outs = ["FatTree{i}.daml".format(i = i) for i in range(1, 19)], + cmd = "$(location :generate-module-tree) $(@D) 18", + tools = [":generate-module-tree"], + visibility = ["//visibility:public"], +) + +damlc_compile_test( + name = "memory-module-tree", + srcs = [":module-tree-test"], + main = "FatTree18.daml", + visibility = ["//visibility:public"], +) + +damlc_compile_test( + name = "memory-examples", + srcs = [":daml-test-files"], + heap_limit = "200M", + main = "daml-test-files/Examples.daml", + stack_limit = "230K", +) + +damlc_compile_test( + name = "memory-bond-trading", + srcs = [":bond-trading"], + heap_limit = "200M" if is_windows else "100M", + main = "bond-trading/Test.daml", + stack_limit = "35K", +) + +filegroup( + name = "daml-test-files", + srcs = glob(["daml-test-files/**"]), + visibility = [ + "__pkg__", + "//daml-foundations/integration-tests:__pkg__", + ], +) + +filegroup( + name = "bond-trading", + srcs = glob(["bond-trading/**"]), + visibility = [ + "__pkg__", + "//daml-foundations/integration-tests:__pkg__", + ], +) + +# Check that DAML compilation is deterministic. + +sh_test( + name = "deterministic", + srcs = ["src/daml-ghc-deterministic.sh"], + args = [ + "$(location //compiler/damlc)", + "$(location @com_google_protobuf//:protoc)", + ], + data = [ + ":daml-test-files", + "//compiler/damlc", + "//compiler/damlc/pkg-db", + "@com_google_protobuf//:protoc", + ], + deps = [ + "@bazel_tools//tools/bash/runfiles", + ], +) diff --git a/compiler/damlc/bond-trading/Bond.daml b/compiler/damlc/tests/bond-trading/Bond.daml similarity index 100% rename from compiler/damlc/bond-trading/Bond.daml rename to compiler/damlc/tests/bond-trading/Bond.daml diff --git a/compiler/damlc/bond-trading/Cash.daml b/compiler/damlc/tests/bond-trading/Cash.daml similarity index 100% rename from compiler/damlc/bond-trading/Cash.daml rename to compiler/damlc/tests/bond-trading/Cash.daml diff --git a/compiler/damlc/bond-trading/Dvp.daml b/compiler/damlc/tests/bond-trading/Dvp.daml similarity index 100% rename from compiler/damlc/bond-trading/Dvp.daml rename to compiler/damlc/tests/bond-trading/Dvp.daml diff --git a/compiler/damlc/bond-trading/DvpNotification.daml b/compiler/damlc/tests/bond-trading/DvpNotification.daml similarity index 100% rename from compiler/damlc/bond-trading/DvpNotification.daml rename to compiler/damlc/tests/bond-trading/DvpNotification.daml diff --git a/compiler/damlc/bond-trading/DvpTerms.daml b/compiler/damlc/tests/bond-trading/DvpTerms.daml similarity index 100% rename from compiler/damlc/bond-trading/DvpTerms.daml rename to compiler/damlc/tests/bond-trading/DvpTerms.daml diff --git a/compiler/damlc/bond-trading/Helper.daml b/compiler/damlc/tests/bond-trading/Helper.daml similarity index 100% rename from compiler/damlc/bond-trading/Helper.daml rename to compiler/damlc/tests/bond-trading/Helper.daml diff --git a/compiler/damlc/bond-trading/Setup.daml b/compiler/damlc/tests/bond-trading/Setup.daml similarity index 100% rename from compiler/damlc/bond-trading/Setup.daml rename to compiler/damlc/tests/bond-trading/Setup.daml diff --git a/compiler/damlc/bond-trading/Test.daml b/compiler/damlc/tests/bond-trading/Test.daml similarity index 100% rename from compiler/damlc/bond-trading/Test.daml rename to compiler/damlc/tests/bond-trading/Test.daml diff --git a/compiler/damlc/test-files/ActionFail.daml b/compiler/damlc/tests/daml-test-files/ActionFail.daml similarity index 100% rename from compiler/damlc/test-files/ActionFail.daml rename to compiler/damlc/tests/daml-test-files/ActionFail.daml diff --git a/compiler/damlc/test-files/AliasCompression.daml b/compiler/damlc/tests/daml-test-files/AliasCompression.daml similarity index 100% rename from compiler/damlc/test-files/AliasCompression.daml rename to compiler/damlc/tests/daml-test-files/AliasCompression.daml diff --git a/compiler/damlc/test-files/AliasNonLocal.daml b/compiler/damlc/tests/daml-test-files/AliasNonLocal.daml similarity index 100% rename from compiler/damlc/test-files/AliasNonLocal.daml rename to compiler/damlc/tests/daml-test-files/AliasNonLocal.daml diff --git a/compiler/damlc/test-files/AmbiguousDataType.daml b/compiler/damlc/tests/daml-test-files/AmbiguousDataType.daml similarity index 100% rename from compiler/damlc/test-files/AmbiguousDataType.daml rename to compiler/damlc/tests/daml-test-files/AmbiguousDataType.daml diff --git a/compiler/damlc/test-files/Bad.daml b/compiler/damlc/tests/daml-test-files/Bad.daml similarity index 100% rename from compiler/damlc/test-files/Bad.daml rename to compiler/damlc/tests/daml-test-files/Bad.daml diff --git a/compiler/damlc/test-files/BadCodePoint.daml b/compiler/damlc/tests/daml-test-files/BadCodePoint.daml similarity index 100% rename from compiler/damlc/test-files/BadCodePoint.daml rename to compiler/damlc/tests/daml-test-files/BadCodePoint.daml diff --git a/compiler/damlc/test-files/BadUTF8.daml b/compiler/damlc/tests/daml-test-files/BadUTF8.daml similarity index 100% rename from compiler/damlc/test-files/BadUTF8.daml rename to compiler/damlc/tests/daml-test-files/BadUTF8.daml diff --git a/compiler/damlc/test-files/Choice_no_params_template.daml b/compiler/damlc/tests/daml-test-files/Choice_no_params_template.daml similarity index 100% rename from compiler/damlc/test-files/Choice_no_params_template.daml rename to compiler/damlc/tests/daml-test-files/Choice_no_params_template.daml diff --git a/compiler/damlc/test-files/Choice_superfluous_with.daml b/compiler/damlc/tests/daml-test-files/Choice_superfluous_with.daml similarity index 100% rename from compiler/damlc/test-files/Choice_superfluous_with.daml rename to compiler/damlc/tests/daml-test-files/Choice_superfluous_with.daml diff --git a/compiler/damlc/test-files/CoerceContractId.daml b/compiler/damlc/tests/daml-test-files/CoerceContractId.daml similarity index 100% rename from compiler/damlc/test-files/CoerceContractId.daml rename to compiler/damlc/tests/daml-test-files/CoerceContractId.daml diff --git a/compiler/damlc/test-files/Collision.daml b/compiler/damlc/tests/daml-test-files/Collision.daml similarity index 100% rename from compiler/damlc/test-files/Collision.daml rename to compiler/damlc/tests/daml-test-files/Collision.daml diff --git a/compiler/damlc/test-files/ComposedKey.daml b/compiler/damlc/tests/daml-test-files/ComposedKey.daml similarity index 100% rename from compiler/damlc/test-files/ComposedKey.daml rename to compiler/damlc/tests/daml-test-files/ComposedKey.daml diff --git a/compiler/damlc/test-files/Conjunction.daml b/compiler/damlc/tests/daml-test-files/Conjunction.daml similarity index 100% rename from compiler/damlc/test-files/Conjunction.daml rename to compiler/damlc/tests/daml-test-files/Conjunction.daml diff --git a/compiler/damlc/test-files/Constraint.daml b/compiler/damlc/tests/daml-test-files/Constraint.daml similarity index 100% rename from compiler/damlc/test-files/Constraint.daml rename to compiler/damlc/tests/daml-test-files/Constraint.daml diff --git a/compiler/damlc/test-files/ConstraintBad.daml b/compiler/damlc/tests/daml-test-files/ConstraintBad.daml similarity index 100% rename from compiler/damlc/test-files/ConstraintBad.daml rename to compiler/damlc/tests/daml-test-files/ConstraintBad.daml diff --git a/compiler/damlc/test-files/ConsumingTests.daml b/compiler/damlc/tests/daml-test-files/ConsumingTests.daml similarity index 100% rename from compiler/damlc/test-files/ConsumingTests.daml rename to compiler/damlc/tests/daml-test-files/ConsumingTests.daml diff --git a/compiler/damlc/test-files/ContractKeys.daml b/compiler/damlc/tests/daml-test-files/ContractKeys.daml similarity index 100% rename from compiler/damlc/test-files/ContractKeys.daml rename to compiler/damlc/tests/daml-test-files/ContractKeys.daml diff --git a/compiler/damlc/test-files/CustomOptional.daml b/compiler/damlc/tests/daml-test-files/CustomOptional.daml similarity index 100% rename from compiler/damlc/test-files/CustomOptional.daml rename to compiler/damlc/tests/daml-test-files/CustomOptional.daml diff --git a/compiler/damlc/test-files/Cyclic.daml b/compiler/damlc/tests/daml-test-files/Cyclic.daml similarity index 100% rename from compiler/damlc/test-files/Cyclic.daml rename to compiler/damlc/tests/daml-test-files/Cyclic.daml diff --git a/compiler/damlc/test-files/DataRecursion.daml b/compiler/damlc/tests/daml-test-files/DataRecursion.daml similarity index 100% rename from compiler/damlc/test-files/DataRecursion.daml rename to compiler/damlc/tests/daml-test-files/DataRecursion.daml diff --git a/compiler/damlc/test-files/DataTypes.daml b/compiler/damlc/tests/daml-test-files/DataTypes.daml similarity index 100% rename from compiler/damlc/test-files/DataTypes.daml rename to compiler/damlc/tests/daml-test-files/DataTypes.daml diff --git a/compiler/damlc/test-files/DefaultMethods.daml b/compiler/damlc/tests/daml-test-files/DefaultMethods.daml similarity index 100% rename from compiler/damlc/test-files/DefaultMethods.daml rename to compiler/damlc/tests/daml-test-files/DefaultMethods.daml diff --git a/compiler/damlc/test-files/Deriving.daml b/compiler/damlc/tests/daml-test-files/Deriving.daml similarity index 100% rename from compiler/damlc/test-files/Deriving.daml rename to compiler/damlc/tests/daml-test-files/Deriving.daml diff --git a/compiler/damlc/test-files/DesugarWarnings.daml b/compiler/damlc/tests/daml-test-files/DesugarWarnings.daml similarity index 100% rename from compiler/damlc/test-files/DesugarWarnings.daml rename to compiler/damlc/tests/daml-test-files/DesugarWarnings.daml diff --git a/compiler/damlc/test-files/DisjunctionChoices.daml b/compiler/damlc/tests/daml-test-files/DisjunctionChoices.daml similarity index 100% rename from compiler/damlc/test-files/DisjunctionChoices.daml rename to compiler/damlc/tests/daml-test-files/DisjunctionChoices.daml diff --git a/compiler/damlc/test-files/Divulgence.daml b/compiler/damlc/tests/daml-test-files/Divulgence.daml similarity index 100% rename from compiler/damlc/test-files/Divulgence.daml rename to compiler/damlc/tests/daml-test-files/Divulgence.daml diff --git a/compiler/damlc/test-files/Either.daml b/compiler/damlc/tests/daml-test-files/Either.daml similarity index 100% rename from compiler/damlc/test-files/Either.daml rename to compiler/damlc/tests/daml-test-files/Either.daml diff --git a/compiler/damlc/test-files/Empty.daml b/compiler/damlc/tests/daml-test-files/Empty.daml similarity index 100% rename from compiler/damlc/test-files/Empty.daml rename to compiler/damlc/tests/daml-test-files/Empty.daml diff --git a/compiler/damlc/test-files/EmptyWith.daml b/compiler/damlc/tests/daml-test-files/EmptyWith.daml similarity index 100% rename from compiler/damlc/test-files/EmptyWith.daml rename to compiler/damlc/tests/daml-test-files/EmptyWith.daml diff --git a/compiler/damlc/test-files/Enum.daml b/compiler/damlc/tests/daml-test-files/Enum.daml similarity index 100% rename from compiler/damlc/test-files/Enum.daml rename to compiler/damlc/tests/daml-test-files/Enum.daml diff --git a/compiler/damlc/test-files/EnumFromThenTo.daml b/compiler/damlc/tests/daml-test-files/EnumFromThenTo.daml similarity index 100% rename from compiler/damlc/test-files/EnumFromThenTo.daml rename to compiler/damlc/tests/daml-test-files/EnumFromThenTo.daml diff --git a/compiler/damlc/test-files/EnumLF.daml b/compiler/damlc/tests/daml-test-files/EnumLF.daml similarity index 100% rename from compiler/damlc/test-files/EnumLF.daml rename to compiler/damlc/tests/daml-test-files/EnumLF.daml diff --git a/compiler/damlc/test-files/EqContractId.daml b/compiler/damlc/tests/daml-test-files/EqContractId.daml similarity index 100% rename from compiler/damlc/test-files/EqContractId.daml rename to compiler/damlc/tests/daml-test-files/EqContractId.daml diff --git a/compiler/damlc/test-files/EqPoly.daml b/compiler/damlc/tests/daml-test-files/EqPoly.daml similarity index 100% rename from compiler/damlc/test-files/EqPoly.daml rename to compiler/damlc/tests/daml-test-files/EqPoly.daml diff --git a/compiler/damlc/test-files/ErrorsWithColons.daml b/compiler/damlc/tests/daml-test-files/ErrorsWithColons.daml similarity index 100% rename from compiler/damlc/test-files/ErrorsWithColons.daml rename to compiler/damlc/tests/daml-test-files/ErrorsWithColons.daml diff --git a/compiler/damlc/test-files/Examples.daml b/compiler/damlc/tests/daml-test-files/Examples.daml similarity index 100% rename from compiler/damlc/test-files/Examples.daml rename to compiler/damlc/tests/daml-test-files/Examples.daml diff --git a/compiler/damlc/test-files/ExerciseWithoutActors.daml b/compiler/damlc/tests/daml-test-files/ExerciseWithoutActors.daml similarity index 100% rename from compiler/damlc/test-files/ExerciseWithoutActors.daml rename to compiler/damlc/tests/daml-test-files/ExerciseWithoutActors.daml diff --git a/compiler/damlc/test-files/Existential.daml b/compiler/damlc/tests/daml-test-files/Existential.daml similarity index 100% rename from compiler/damlc/test-files/Existential.daml rename to compiler/damlc/tests/daml-test-files/Existential.daml diff --git a/compiler/damlc/test-files/ExistentialSum.daml b/compiler/damlc/tests/daml-test-files/ExistentialSum.daml similarity index 100% rename from compiler/damlc/test-files/ExistentialSum.daml rename to compiler/damlc/tests/daml-test-files/ExistentialSum.daml diff --git a/compiler/damlc/test-files/Fib.daml b/compiler/damlc/tests/daml-test-files/Fib.daml similarity index 100% rename from compiler/damlc/test-files/Fib.daml rename to compiler/damlc/tests/daml-test-files/Fib.daml diff --git a/compiler/damlc/test-files/FunRetTypeSig.daml b/compiler/damlc/tests/daml-test-files/FunRetTypeSig.daml similarity index 100% rename from compiler/damlc/test-files/FunRetTypeSig.daml rename to compiler/damlc/tests/daml-test-files/FunRetTypeSig.daml diff --git a/compiler/damlc/test-files/GenTemplCompat.daml b/compiler/damlc/tests/daml-test-files/GenTemplCompat.daml similarity index 100% rename from compiler/damlc/test-files/GenTemplCompat.daml rename to compiler/damlc/tests/daml-test-files/GenTemplCompat.daml diff --git a/compiler/damlc/test-files/GenericTemplates.daml b/compiler/damlc/tests/daml-test-files/GenericTemplates.daml similarity index 100% rename from compiler/damlc/test-files/GenericTemplates.daml rename to compiler/damlc/tests/daml-test-files/GenericTemplates.daml diff --git a/compiler/damlc/test-files/Generics.daml b/compiler/damlc/tests/daml-test-files/Generics.daml similarity index 100% rename from compiler/damlc/test-files/Generics.daml rename to compiler/damlc/tests/daml-test-files/Generics.daml diff --git a/compiler/damlc/test-files/GetParty.daml b/compiler/damlc/tests/daml-test-files/GetParty.daml similarity index 100% rename from compiler/damlc/test-files/GetParty.daml rename to compiler/damlc/tests/daml-test-files/GetParty.daml diff --git a/compiler/damlc/test-files/GetPartyError.daml b/compiler/damlc/tests/daml-test-files/GetPartyError.daml similarity index 100% rename from compiler/damlc/test-files/GetPartyError.daml rename to compiler/damlc/tests/daml-test-files/GetPartyError.daml diff --git a/compiler/damlc/test-files/Good.daml b/compiler/damlc/tests/daml-test-files/Good.daml similarity index 100% rename from compiler/damlc/test-files/Good.daml rename to compiler/damlc/tests/daml-test-files/Good.daml diff --git a/compiler/damlc/test-files/GoodCodePoints.daml b/compiler/damlc/tests/daml-test-files/GoodCodePoints.daml similarity index 100% rename from compiler/damlc/test-files/GoodCodePoints.daml rename to compiler/damlc/tests/daml-test-files/GoodCodePoints.daml diff --git a/compiler/damlc/test-files/Hack.daml b/compiler/damlc/tests/daml-test-files/Hack.daml similarity index 100% rename from compiler/damlc/test-files/Hack.daml rename to compiler/damlc/tests/daml-test-files/Hack.daml diff --git a/compiler/damlc/test-files/HelloWorld.daml b/compiler/damlc/tests/daml-test-files/HelloWorld.daml similarity index 100% rename from compiler/damlc/test-files/HelloWorld.daml rename to compiler/damlc/tests/daml-test-files/HelloWorld.daml diff --git a/compiler/damlc/test-files/Import.daml b/compiler/damlc/tests/daml-test-files/Import.daml similarity index 100% rename from compiler/damlc/test-files/Import.daml rename to compiler/damlc/tests/daml-test-files/Import.daml diff --git a/compiler/damlc/test-files/IntBoundsDynamic.daml b/compiler/damlc/tests/daml-test-files/IntBoundsDynamic.daml similarity index 100% rename from compiler/damlc/test-files/IntBoundsDynamic.daml rename to compiler/damlc/tests/daml-test-files/IntBoundsDynamic.daml diff --git a/compiler/damlc/test-files/IntBoundsLower.daml b/compiler/damlc/tests/daml-test-files/IntBoundsLower.daml similarity index 100% rename from compiler/damlc/test-files/IntBoundsLower.daml rename to compiler/damlc/tests/daml-test-files/IntBoundsLower.daml diff --git a/compiler/damlc/test-files/IntBoundsUpper.daml b/compiler/damlc/tests/daml-test-files/IntBoundsUpper.daml similarity index 100% rename from compiler/damlc/test-files/IntBoundsUpper.daml rename to compiler/damlc/tests/daml-test-files/IntBoundsUpper.daml diff --git a/compiler/damlc/test-files/InternalImport.daml b/compiler/damlc/tests/daml-test-files/InternalImport.daml similarity index 100% rename from compiler/damlc/test-files/InternalImport.daml rename to compiler/damlc/tests/daml-test-files/InternalImport.daml diff --git a/compiler/damlc/test-files/InternedExternalRefs.daml b/compiler/damlc/tests/daml-test-files/InternedExternalRefs.daml similarity index 100% rename from compiler/damlc/test-files/InternedExternalRefs.daml rename to compiler/damlc/tests/daml-test-files/InternedExternalRefs.daml diff --git a/compiler/damlc/test-files/Iou12.daml b/compiler/damlc/tests/daml-test-files/Iou12.daml similarity index 100% rename from compiler/damlc/test-files/Iou12.daml rename to compiler/damlc/tests/daml-test-files/Iou12.daml diff --git a/compiler/damlc/test-files/IouDSL.daml b/compiler/damlc/tests/daml-test-files/IouDSL.daml similarity index 100% rename from compiler/damlc/test-files/IouDSL.daml rename to compiler/damlc/tests/daml-test-files/IouDSL.daml diff --git a/compiler/damlc/test-files/Iou_new.daml b/compiler/damlc/tests/daml-test-files/Iou_new.daml similarity index 100% rename from compiler/damlc/test-files/Iou_new.daml rename to compiler/damlc/tests/daml-test-files/Iou_new.daml diff --git a/compiler/damlc/test-files/Iou_template.EXPECTED.md b/compiler/damlc/tests/daml-test-files/Iou_template.EXPECTED.md similarity index 100% rename from compiler/damlc/test-files/Iou_template.EXPECTED.md rename to compiler/damlc/tests/daml-test-files/Iou_template.EXPECTED.md diff --git a/compiler/damlc/test-files/Iou_template.EXPECTED.rst b/compiler/damlc/tests/daml-test-files/Iou_template.EXPECTED.rst similarity index 100% rename from compiler/damlc/test-files/Iou_template.EXPECTED.rst rename to compiler/damlc/tests/daml-test-files/Iou_template.EXPECTED.rst diff --git a/compiler/damlc/test-files/Iou_template.daml b/compiler/damlc/tests/daml-test-files/Iou_template.daml similarity index 100% rename from compiler/damlc/test-files/Iou_template.daml rename to compiler/damlc/tests/daml-test-files/Iou_template.daml diff --git a/compiler/damlc/test-files/Isomorphism.daml b/compiler/damlc/tests/daml-test-files/Isomorphism.daml similarity index 100% rename from compiler/damlc/test-files/Isomorphism.daml rename to compiler/damlc/tests/daml-test-files/Isomorphism.daml diff --git a/compiler/damlc/test-files/IsomorphismFail.daml b/compiler/damlc/tests/daml-test-files/IsomorphismFail.daml similarity index 100% rename from compiler/damlc/test-files/IsomorphismFail.daml rename to compiler/damlc/tests/daml-test-files/IsomorphismFail.daml diff --git a/compiler/damlc/test-files/Lazy.daml b/compiler/damlc/tests/daml-test-files/Lazy.daml similarity index 100% rename from compiler/damlc/test-files/Lazy.daml rename to compiler/damlc/tests/daml-test-files/Lazy.daml diff --git a/compiler/damlc/test-files/List.daml b/compiler/damlc/tests/daml-test-files/List.daml similarity index 100% rename from compiler/damlc/test-files/List.daml rename to compiler/damlc/tests/daml-test-files/List.daml diff --git a/compiler/damlc/test-files/ListComprehension.daml b/compiler/damlc/tests/daml-test-files/ListComprehension.daml similarity index 100% rename from compiler/damlc/test-files/ListComprehension.daml rename to compiler/damlc/tests/daml-test-files/ListComprehension.daml diff --git a/compiler/damlc/test-files/ListEq.daml b/compiler/damlc/tests/daml-test-files/ListEq.daml similarity index 100% rename from compiler/damlc/test-files/ListEq.daml rename to compiler/damlc/tests/daml-test-files/ListEq.daml diff --git a/compiler/damlc/test-files/LogicTest.daml b/compiler/damlc/tests/daml-test-files/LogicTest.daml similarity index 100% rename from compiler/damlc/test-files/LogicTest.daml rename to compiler/damlc/tests/daml-test-files/LogicTest.daml diff --git a/compiler/damlc/test-files/Main.daml b/compiler/damlc/tests/daml-test-files/Main.daml similarity index 100% rename from compiler/damlc/test-files/Main.daml rename to compiler/damlc/tests/daml-test-files/Main.daml diff --git a/compiler/damlc/test-files/Map.daml b/compiler/damlc/tests/daml-test-files/Map.daml similarity index 100% rename from compiler/damlc/test-files/Map.daml rename to compiler/damlc/tests/daml-test-files/Map.daml diff --git a/compiler/damlc/test-files/Math.daml b/compiler/damlc/tests/daml-test-files/Math.daml similarity index 100% rename from compiler/damlc/test-files/Math.daml rename to compiler/damlc/tests/daml-test-files/Math.daml diff --git a/compiler/damlc/test-files/MaybeCompat.daml b/compiler/damlc/tests/daml-test-files/MaybeCompat.daml similarity index 100% rename from compiler/damlc/test-files/MaybeCompat.daml rename to compiler/damlc/tests/daml-test-files/MaybeCompat.daml diff --git a/compiler/damlc/test-files/MissingFields.daml b/compiler/damlc/tests/daml-test-files/MissingFields.daml similarity index 100% rename from compiler/damlc/test-files/MissingFields.daml rename to compiler/damlc/tests/daml-test-files/MissingFields.daml diff --git a/compiler/damlc/test-files/MissingVersion.daml b/compiler/damlc/tests/daml-test-files/MissingVersion.daml similarity index 100% rename from compiler/damlc/test-files/MissingVersion.daml rename to compiler/damlc/tests/daml-test-files/MissingVersion.daml diff --git a/compiler/damlc/test-files/ModuleName.daml b/compiler/damlc/tests/daml-test-files/ModuleName.daml similarity index 100% rename from compiler/damlc/test-files/ModuleName.daml rename to compiler/damlc/tests/daml-test-files/ModuleName.daml diff --git a/compiler/damlc/test-files/MonoidTest.daml b/compiler/damlc/tests/daml-test-files/MonoidTest.daml similarity index 100% rename from compiler/damlc/test-files/MonoidTest.daml rename to compiler/damlc/tests/daml-test-files/MonoidTest.daml diff --git a/compiler/damlc/test-files/MultipleFields.daml b/compiler/damlc/tests/daml-test-files/MultipleFields.daml similarity index 100% rename from compiler/damlc/test-files/MultipleFields.daml rename to compiler/damlc/tests/daml-test-files/MultipleFields.daml diff --git a/compiler/damlc/test-files/NO_AUTO_COPYRIGHT b/compiler/damlc/tests/daml-test-files/NO_AUTO_COPYRIGHT similarity index 100% rename from compiler/damlc/test-files/NO_AUTO_COPYRIGHT rename to compiler/damlc/tests/daml-test-files/NO_AUTO_COPYRIGHT diff --git a/compiler/damlc/test-files/Nat.daml b/compiler/damlc/tests/daml-test-files/Nat.daml similarity index 100% rename from compiler/damlc/test-files/Nat.daml rename to compiler/damlc/tests/daml-test-files/Nat.daml diff --git a/compiler/damlc/test-files/Newtype.daml b/compiler/damlc/tests/daml-test-files/Newtype.daml similarity index 100% rename from compiler/damlc/test-files/Newtype.daml rename to compiler/damlc/tests/daml-test-files/Newtype.daml diff --git a/compiler/damlc/test-files/NewtypeDerive.daml b/compiler/damlc/tests/daml-test-files/NewtypeDerive.daml similarity index 100% rename from compiler/damlc/test-files/NewtypeDerive.daml rename to compiler/damlc/tests/daml-test-files/NewtypeDerive.daml diff --git a/compiler/damlc/test-files/NewtypeHigherKinded.daml b/compiler/damlc/tests/daml-test-files/NewtypeHigherKinded.daml similarity index 100% rename from compiler/damlc/test-files/NewtypeHigherKinded.daml rename to compiler/damlc/tests/daml-test-files/NewtypeHigherKinded.daml diff --git a/compiler/damlc/test-files/NewtypeNested.daml b/compiler/damlc/tests/daml-test-files/NewtypeNested.daml similarity index 100% rename from compiler/damlc/test-files/NewtypeNested.daml rename to compiler/damlc/tests/daml-test-files/NewtypeNested.daml diff --git a/compiler/damlc/test-files/NewtypePolymorphic.daml b/compiler/damlc/tests/daml-test-files/NewtypePolymorphic.daml similarity index 100% rename from compiler/damlc/test-files/NewtypePolymorphic.daml rename to compiler/damlc/tests/daml-test-files/NewtypePolymorphic.daml diff --git a/compiler/damlc/test-files/NoCaseOfCase.daml b/compiler/damlc/tests/daml-test-files/NoCaseOfCase.daml similarity index 100% rename from compiler/damlc/test-files/NoCaseOfCase.daml rename to compiler/damlc/tests/daml-test-files/NoCaseOfCase.daml diff --git a/compiler/damlc/test-files/NoControllerAsVar.daml b/compiler/damlc/tests/daml-test-files/NoControllerAsVar.daml similarity index 100% rename from compiler/damlc/test-files/NoControllerAsVar.daml rename to compiler/damlc/tests/daml-test-files/NoControllerAsVar.daml diff --git a/compiler/damlc/test-files/No_concat_clash.daml b/compiler/damlc/tests/daml-test-files/No_concat_clash.daml similarity index 100% rename from compiler/damlc/test-files/No_concat_clash.daml rename to compiler/damlc/tests/daml-test-files/No_concat_clash.daml diff --git a/compiler/damlc/test-files/NonEmpty.daml b/compiler/damlc/tests/daml-test-files/NonEmpty.daml similarity index 100% rename from compiler/damlc/test-files/NonEmpty.daml rename to compiler/damlc/tests/daml-test-files/NonEmpty.daml diff --git a/compiler/damlc/test-files/NumericUnderscore.daml b/compiler/damlc/tests/daml-test-files/NumericUnderscore.daml similarity index 100% rename from compiler/damlc/test-files/NumericUnderscore.daml rename to compiler/damlc/tests/daml-test-files/NumericUnderscore.daml diff --git a/compiler/damlc/test-files/Optional.daml b/compiler/damlc/tests/daml-test-files/Optional.daml similarity index 100% rename from compiler/damlc/test-files/Optional.daml rename to compiler/damlc/tests/daml-test-files/Optional.daml diff --git a/compiler/damlc/test-files/Optional_Total.daml b/compiler/damlc/tests/daml-test-files/Optional_Total.daml similarity index 100% rename from compiler/damlc/test-files/Optional_Total.daml rename to compiler/damlc/tests/daml-test-files/Optional_Total.daml diff --git a/compiler/damlc/test-files/OrdOptional.daml b/compiler/damlc/tests/daml-test-files/OrdOptional.daml similarity index 100% rename from compiler/damlc/test-files/OrdOptional.daml rename to compiler/damlc/tests/daml-test-files/OrdOptional.daml diff --git a/compiler/damlc/test-files/Otherwise.daml b/compiler/damlc/tests/daml-test-files/Otherwise.daml similarity index 100% rename from compiler/damlc/test-files/Otherwise.daml rename to compiler/damlc/tests/daml-test-files/Otherwise.daml diff --git a/compiler/damlc/test-files/PartyCompare.daml b/compiler/damlc/tests/daml-test-files/PartyCompare.daml similarity index 100% rename from compiler/damlc/test-files/PartyCompare.daml rename to compiler/damlc/tests/daml-test-files/PartyCompare.daml diff --git a/compiler/damlc/test-files/PartyVsText.daml b/compiler/damlc/tests/daml-test-files/PartyVsText.daml similarity index 100% rename from compiler/damlc/test-files/PartyVsText.daml rename to compiler/damlc/tests/daml-test-files/PartyVsText.daml diff --git a/compiler/damlc/test-files/PatError.daml b/compiler/damlc/tests/daml-test-files/PatError.daml similarity index 100% rename from compiler/damlc/test-files/PatError.daml rename to compiler/damlc/tests/daml-test-files/PatError.daml diff --git a/compiler/damlc/test-files/PatternSynonyms.daml b/compiler/damlc/tests/daml-test-files/PatternSynonyms.daml similarity index 100% rename from compiler/damlc/test-files/PatternSynonyms.daml rename to compiler/damlc/tests/daml-test-files/PatternSynonyms.daml diff --git a/compiler/damlc/test-files/Phantom.daml b/compiler/damlc/tests/daml-test-files/Phantom.daml similarity index 100% rename from compiler/damlc/test-files/Phantom.daml rename to compiler/damlc/tests/daml-test-files/Phantom.daml diff --git a/compiler/damlc/test-files/PolymorphicTest.daml b/compiler/damlc/tests/daml-test-files/PolymorphicTest.daml similarity index 100% rename from compiler/damlc/test-files/PolymorphicTest.daml rename to compiler/damlc/tests/daml-test-files/PolymorphicTest.daml diff --git a/compiler/damlc/test-files/Precondition.daml b/compiler/damlc/tests/daml-test-files/Precondition.daml similarity index 100% rename from compiler/damlc/test-files/Precondition.daml rename to compiler/damlc/tests/daml-test-files/Precondition.daml diff --git a/compiler/damlc/test-files/PreludeTest.daml b/compiler/damlc/tests/daml-test-files/PreludeTest.daml similarity index 100% rename from compiler/damlc/test-files/PreludeTest.daml rename to compiler/damlc/tests/daml-test-files/PreludeTest.daml diff --git a/compiler/damlc/test-files/Profunctor.daml b/compiler/damlc/tests/daml-test-files/Profunctor.daml similarity index 100% rename from compiler/damlc/test-files/Profunctor.daml rename to compiler/damlc/tests/daml-test-files/Profunctor.daml diff --git a/compiler/damlc/test-files/ProposalDSL.daml b/compiler/damlc/tests/daml-test-files/ProposalDSL.daml similarity index 100% rename from compiler/damlc/test-files/ProposalDSL.daml rename to compiler/damlc/tests/daml-test-files/ProposalDSL.daml diff --git a/compiler/damlc/test-files/QualifiedPrelude.daml b/compiler/damlc/tests/daml-test-files/QualifiedPrelude.daml similarity index 100% rename from compiler/damlc/test-files/QualifiedPrelude.daml rename to compiler/damlc/tests/daml-test-files/QualifiedPrelude.daml diff --git a/compiler/damlc/test-files/Random.daml b/compiler/damlc/tests/daml-test-files/Random.daml similarity index 100% rename from compiler/damlc/test-files/Random.daml rename to compiler/damlc/tests/daml-test-files/Random.daml diff --git a/compiler/damlc/test-files/Rank2.daml b/compiler/damlc/tests/daml-test-files/Rank2.daml similarity index 100% rename from compiler/damlc/test-files/Rank2.daml rename to compiler/damlc/tests/daml-test-files/Rank2.daml diff --git a/compiler/damlc/test-files/RationalLowerBoundError.daml b/compiler/damlc/tests/daml-test-files/RationalLowerBoundError.daml similarity index 100% rename from compiler/damlc/test-files/RationalLowerBoundError.daml rename to compiler/damlc/tests/daml-test-files/RationalLowerBoundError.daml diff --git a/compiler/damlc/test-files/RationalLowerBoundMax.daml b/compiler/damlc/tests/daml-test-files/RationalLowerBoundMax.daml similarity index 100% rename from compiler/damlc/test-files/RationalLowerBoundMax.daml rename to compiler/damlc/tests/daml-test-files/RationalLowerBoundMax.daml diff --git a/compiler/damlc/test-files/RationalPrecisionMax.daml b/compiler/damlc/tests/daml-test-files/RationalPrecisionMax.daml similarity index 100% rename from compiler/damlc/test-files/RationalPrecisionMax.daml rename to compiler/damlc/tests/daml-test-files/RationalPrecisionMax.daml diff --git a/compiler/damlc/test-files/RationalPrecisionUpperBoundError.daml b/compiler/damlc/tests/daml-test-files/RationalPrecisionUpperBoundError.daml similarity index 100% rename from compiler/damlc/test-files/RationalPrecisionUpperBoundError.daml rename to compiler/damlc/tests/daml-test-files/RationalPrecisionUpperBoundError.daml diff --git a/compiler/damlc/test-files/RationalUpperBoundError.daml b/compiler/damlc/tests/daml-test-files/RationalUpperBoundError.daml similarity index 100% rename from compiler/damlc/test-files/RationalUpperBoundError.daml rename to compiler/damlc/tests/daml-test-files/RationalUpperBoundError.daml diff --git a/compiler/damlc/test-files/RationalUpperBoundMax.daml b/compiler/damlc/tests/daml-test-files/RationalUpperBoundMax.daml similarity index 100% rename from compiler/damlc/test-files/RationalUpperBoundMax.daml rename to compiler/damlc/tests/daml-test-files/RationalUpperBoundMax.daml diff --git a/compiler/damlc/test-files/RecordBig.daml b/compiler/damlc/tests/daml-test-files/RecordBig.daml similarity index 100% rename from compiler/damlc/test-files/RecordBig.daml rename to compiler/damlc/tests/daml-test-files/RecordBig.daml diff --git a/compiler/damlc/test-files/RecordUpdate.daml b/compiler/damlc/tests/daml-test-files/RecordUpdate.daml similarity index 100% rename from compiler/damlc/test-files/RecordUpdate.daml rename to compiler/damlc/tests/daml-test-files/RecordUpdate.daml diff --git a/compiler/damlc/test-files/Records.daml b/compiler/damlc/tests/daml-test-files/Records.daml similarity index 100% rename from compiler/damlc/test-files/Records.daml rename to compiler/damlc/tests/daml-test-files/Records.daml diff --git a/compiler/damlc/test-files/RelTimeDetailsHidden1.daml b/compiler/damlc/tests/daml-test-files/RelTimeDetailsHidden1.daml similarity index 100% rename from compiler/damlc/test-files/RelTimeDetailsHidden1.daml rename to compiler/damlc/tests/daml-test-files/RelTimeDetailsHidden1.daml diff --git a/compiler/damlc/test-files/RelTimeDetailsHidden2.daml b/compiler/damlc/tests/daml-test-files/RelTimeDetailsHidden2.daml similarity index 100% rename from compiler/damlc/test-files/RelTimeDetailsHidden2.daml rename to compiler/damlc/tests/daml-test-files/RelTimeDetailsHidden2.daml diff --git a/compiler/damlc/test-files/RightOfUse.daml b/compiler/damlc/tests/daml-test-files/RightOfUse.daml similarity index 100% rename from compiler/damlc/test-files/RightOfUse.daml rename to compiler/damlc/tests/daml-test-files/RightOfUse.daml diff --git a/compiler/damlc/test-files/SameNameConstructor.daml b/compiler/damlc/tests/daml-test-files/SameNameConstructor.daml similarity index 100% rename from compiler/damlc/test-files/SameNameConstructor.daml rename to compiler/damlc/tests/daml-test-files/SameNameConstructor.daml diff --git a/compiler/damlc/test-files/ScenarioReturningUpdate.daml b/compiler/damlc/tests/daml-test-files/ScenarioReturningUpdate.daml similarity index 100% rename from compiler/damlc/test-files/ScenarioReturningUpdate.daml rename to compiler/damlc/tests/daml-test-files/ScenarioReturningUpdate.daml diff --git a/compiler/damlc/test-files/Self.daml b/compiler/damlc/tests/daml-test-files/Self.daml similarity index 100% rename from compiler/damlc/test-files/Self.daml rename to compiler/damlc/tests/daml-test-files/Self.daml diff --git a/compiler/damlc/test-files/Self2.daml b/compiler/damlc/tests/daml-test-files/Self2.daml similarity index 100% rename from compiler/damlc/test-files/Self2.daml rename to compiler/damlc/tests/daml-test-files/Self2.daml diff --git a/compiler/damlc/test-files/SemigroupTest.daml b/compiler/damlc/tests/daml-test-files/SemigroupTest.daml similarity index 100% rename from compiler/damlc/test-files/SemigroupTest.daml rename to compiler/damlc/tests/daml-test-files/SemigroupTest.daml diff --git a/compiler/damlc/test-files/SerializableAnnotation.daml b/compiler/damlc/tests/daml-test-files/SerializableAnnotation.daml similarity index 100% rename from compiler/damlc/test-files/SerializableAnnotation.daml rename to compiler/damlc/tests/daml-test-files/SerializableAnnotation.daml diff --git a/compiler/damlc/test-files/SerializableAnnotation/Imported.daml b/compiler/damlc/tests/daml-test-files/SerializableAnnotation/Imported.daml similarity index 100% rename from compiler/damlc/test-files/SerializableAnnotation/Imported.daml rename to compiler/damlc/tests/daml-test-files/SerializableAnnotation/Imported.daml diff --git a/compiler/damlc/test-files/SerializablePolymorphicContractId.daml b/compiler/damlc/tests/daml-test-files/SerializablePolymorphicContractId.daml similarity index 100% rename from compiler/damlc/test-files/SerializablePolymorphicContractId.daml rename to compiler/damlc/tests/daml-test-files/SerializablePolymorphicContractId.daml diff --git a/compiler/damlc/test-files/Set.daml b/compiler/damlc/tests/daml-test-files/Set.daml similarity index 100% rename from compiler/damlc/test-files/Set.daml rename to compiler/damlc/tests/daml-test-files/Set.daml diff --git a/compiler/damlc/test-files/Sha256.daml b/compiler/damlc/tests/daml-test-files/Sha256.daml similarity index 100% rename from compiler/damlc/test-files/Sha256.daml rename to compiler/damlc/tests/daml-test-files/Sha256.daml diff --git a/compiler/damlc/test-files/ShortCircuit.daml b/compiler/damlc/tests/daml-test-files/ShortCircuit.daml similarity index 100% rename from compiler/damlc/test-files/ShortCircuit.daml rename to compiler/damlc/tests/daml-test-files/ShortCircuit.daml diff --git a/compiler/damlc/test-files/Show.daml b/compiler/damlc/tests/daml-test-files/Show.daml similarity index 100% rename from compiler/damlc/test-files/Show.daml rename to compiler/damlc/tests/daml-test-files/Show.daml diff --git a/compiler/damlc/test-files/Simple.daml b/compiler/damlc/tests/daml-test-files/Simple.daml similarity index 100% rename from compiler/damlc/test-files/Simple.daml rename to compiler/damlc/tests/daml-test-files/Simple.daml diff --git a/compiler/damlc/test-files/Stdlib.daml b/compiler/damlc/tests/daml-test-files/Stdlib.daml similarity index 100% rename from compiler/damlc/test-files/Stdlib.daml rename to compiler/damlc/tests/daml-test-files/Stdlib.daml diff --git a/compiler/damlc/test-files/Subdir/Examples.daml b/compiler/damlc/tests/daml-test-files/Subdir/Examples.daml similarity index 100% rename from compiler/damlc/test-files/Subdir/Examples.daml rename to compiler/damlc/tests/daml-test-files/Subdir/Examples.daml diff --git a/compiler/damlc/test-files/SubmitFail.daml b/compiler/damlc/tests/daml-test-files/SubmitFail.daml similarity index 100% rename from compiler/damlc/test-files/SubmitFail.daml rename to compiler/damlc/tests/daml-test-files/SubmitFail.daml diff --git a/compiler/damlc/test-files/SubmitterInMaintainers_after_1866.daml b/compiler/damlc/tests/daml-test-files/SubmitterInMaintainers_after_1866.daml similarity index 100% rename from compiler/damlc/test-files/SubmitterInMaintainers_after_1866.daml rename to compiler/damlc/tests/daml-test-files/SubmitterInMaintainers_after_1866.daml diff --git a/compiler/damlc/test-files/SubmitterInMaintainers_before_1866.daml b/compiler/damlc/tests/daml-test-files/SubmitterInMaintainers_before_1866.daml similarity index 100% rename from compiler/damlc/test-files/SubmitterInMaintainers_before_1866.daml rename to compiler/damlc/tests/daml-test-files/SubmitterInMaintainers_before_1866.daml diff --git a/compiler/damlc/test-files/SugarUnit.daml b/compiler/damlc/tests/daml-test-files/SugarUnit.daml similarity index 100% rename from compiler/damlc/test-files/SugarUnit.daml rename to compiler/damlc/tests/daml-test-files/SugarUnit.daml diff --git a/compiler/damlc/test-files/SumProducts.daml b/compiler/damlc/tests/daml-test-files/SumProducts.daml similarity index 100% rename from compiler/damlc/test-files/SumProducts.daml rename to compiler/damlc/tests/daml-test-files/SumProducts.daml diff --git a/compiler/damlc/test-files/Symbol.daml b/compiler/damlc/tests/daml-test-files/Symbol.daml similarity index 100% rename from compiler/damlc/test-files/Symbol.daml rename to compiler/damlc/tests/daml-test-files/Symbol.daml diff --git a/compiler/damlc/test-files/Text.daml b/compiler/damlc/tests/daml-test-files/Text.daml similarity index 100% rename from compiler/damlc/test-files/Text.daml rename to compiler/damlc/tests/daml-test-files/Text.daml diff --git a/compiler/damlc/test-files/TextEq.daml b/compiler/damlc/tests/daml-test-files/TextEq.daml similarity index 100% rename from compiler/damlc/test-files/TextEq.daml rename to compiler/damlc/tests/daml-test-files/TextEq.daml diff --git a/compiler/damlc/test-files/TextMap.daml b/compiler/damlc/tests/daml-test-files/TextMap.daml similarity index 100% rename from compiler/damlc/test-files/TextMap.daml rename to compiler/damlc/tests/daml-test-files/TextMap.daml diff --git a/compiler/damlc/test-files/Trace.daml b/compiler/damlc/tests/daml-test-files/Trace.daml similarity index 100% rename from compiler/damlc/test-files/Trace.daml rename to compiler/damlc/tests/daml-test-files/Trace.daml diff --git a/compiler/damlc/test-files/Tuple.daml b/compiler/damlc/tests/daml-test-files/Tuple.daml similarity index 100% rename from compiler/damlc/test-files/Tuple.daml rename to compiler/damlc/tests/daml-test-files/Tuple.daml diff --git a/compiler/damlc/test-files/TypeFamily.daml b/compiler/damlc/tests/daml-test-files/TypeFamily.daml similarity index 100% rename from compiler/damlc/test-files/TypeFamily.daml rename to compiler/damlc/tests/daml-test-files/TypeFamily.daml diff --git a/compiler/damlc/test-files/TypeVarShadowing.daml b/compiler/damlc/tests/daml-test-files/TypeVarShadowing.daml similarity index 100% rename from compiler/damlc/test-files/TypeVarShadowing.daml rename to compiler/damlc/tests/daml-test-files/TypeVarShadowing.daml diff --git a/compiler/damlc/test-files/Unicode.daml b/compiler/damlc/tests/daml-test-files/Unicode.daml similarity index 100% rename from compiler/damlc/test-files/Unicode.daml rename to compiler/damlc/tests/daml-test-files/Unicode.daml diff --git a/compiler/damlc/test-files/Unserializable.daml b/compiler/damlc/tests/daml-test-files/Unserializable.daml similarity index 100% rename from compiler/damlc/test-files/Unserializable.daml rename to compiler/damlc/tests/daml-test-files/Unserializable.daml diff --git a/compiler/damlc/test-files/UnusedLet.daml b/compiler/damlc/tests/daml-test-files/UnusedLet.daml similarity index 100% rename from compiler/damlc/test-files/UnusedLet.daml rename to compiler/damlc/tests/daml-test-files/UnusedLet.daml diff --git a/compiler/damlc/test-files/UseInteger.daml b/compiler/damlc/tests/daml-test-files/UseInteger.daml similarity index 100% rename from compiler/damlc/test-files/UseInteger.daml rename to compiler/damlc/tests/daml-test-files/UseInteger.daml diff --git a/compiler/damlc/test-files/Validation.daml b/compiler/damlc/tests/daml-test-files/Validation.daml similarity index 100% rename from compiler/damlc/test-files/Validation.daml rename to compiler/damlc/tests/daml-test-files/Validation.daml diff --git a/compiler/damlc/test-files/ValueRecursion.daml b/compiler/damlc/tests/daml-test-files/ValueRecursion.daml similarity index 100% rename from compiler/damlc/test-files/ValueRecursion.daml rename to compiler/damlc/tests/daml-test-files/ValueRecursion.daml diff --git a/compiler/damlc/test-files/Warnings.daml b/compiler/damlc/tests/daml-test-files/Warnings.daml similarity index 100% rename from compiler/damlc/test-files/Warnings.daml rename to compiler/damlc/tests/daml-test-files/Warnings.daml diff --git a/compiler/damlc/test-files/ide/ImportErrors/ImportNotFound.daml b/compiler/damlc/tests/daml-test-files/ide/ImportErrors/ImportNotFound.daml similarity index 100% rename from compiler/damlc/test-files/ide/ImportErrors/ImportNotFound.daml rename to compiler/damlc/tests/daml-test-files/ide/ImportErrors/ImportNotFound.daml diff --git a/compiler/damlc/test-files/ide/ImportErrors/ImportingImportNotFound.daml b/compiler/damlc/tests/daml-test-files/ide/ImportErrors/ImportingImportNotFound.daml similarity index 100% rename from compiler/damlc/test-files/ide/ImportErrors/ImportingImportNotFound.daml rename to compiler/damlc/tests/daml-test-files/ide/ImportErrors/ImportingImportNotFound.daml diff --git a/compiler/damlc/test-files/ide/Qualified/Bad.daml b/compiler/damlc/tests/daml-test-files/ide/Qualified/Bad.daml similarity index 100% rename from compiler/damlc/test-files/ide/Qualified/Bad.daml rename to compiler/damlc/tests/daml-test-files/ide/Qualified/Bad.daml diff --git a/compiler/damlc/test-files/ide/Qualified/Good.daml b/compiler/damlc/tests/daml-test-files/ide/Qualified/Good.daml similarity index 100% rename from compiler/damlc/test-files/ide/Qualified/Good.daml rename to compiler/damlc/tests/daml-test-files/ide/Qualified/Good.daml diff --git a/compiler/damlc/test-files/ide/Qualified/Import.daml b/compiler/damlc/tests/daml-test-files/ide/Qualified/Import.daml similarity index 100% rename from compiler/damlc/test-files/ide/Qualified/Import.daml rename to compiler/damlc/tests/daml-test-files/ide/Qualified/Import.daml diff --git a/compiler/damlc/test-files/ide/README.md b/compiler/damlc/tests/daml-test-files/ide/README.md similarity index 100% rename from compiler/damlc/test-files/ide/README.md rename to compiler/damlc/tests/daml-test-files/ide/README.md diff --git a/compiler/damlc/test-files/ide/RecursiveImport.daml b/compiler/damlc/tests/daml-test-files/ide/RecursiveImport.daml similarity index 100% rename from compiler/damlc/test-files/ide/RecursiveImport.daml rename to compiler/damlc/tests/daml-test-files/ide/RecursiveImport.daml diff --git a/compiler/damlc/test-files/ide/warning_tab.daml b/compiler/damlc/tests/daml-test-files/ide/warning_tab.daml similarity index 100% rename from compiler/damlc/test-files/ide/warning_tab.daml rename to compiler/damlc/tests/daml-test-files/ide/warning_tab.daml diff --git a/compiler/damlc/cli-tests/CliParser.hs b/compiler/damlc/tests/src/CliParser.hs similarity index 100% rename from compiler/damlc/cli-tests/CliParser.hs rename to compiler/damlc/tests/src/CliParser.hs diff --git a/compiler/damlc/test-src/DA/Test/GHC.hs b/compiler/damlc/tests/src/DA/Test/DamlcIntegration.hs similarity index 99% rename from compiler/damlc/test-src/DA/Test/GHC.hs rename to compiler/damlc/tests/src/DA/Test/DamlcIntegration.hs index 6168cbb697c7..667a9212e63b 100644 --- a/compiler/damlc/test-src/DA/Test/GHC.hs +++ b/compiler/damlc/tests/src/DA/Test/DamlcIntegration.hs @@ -7,7 +7,7 @@ -- | Test driver for DAML-GHC CompilerService. -- For each file, compile it with GHC, convert it, -- typecheck with LF, test it. Test annotations are documented as 'Ann'. -module DA.Test.GHC +module DA.Test.DamlcIntegration ( main , mainAll ) where @@ -114,13 +114,13 @@ getIntegrationTests registerTODO scenarioService version = do do n <- getNumCapabilities; putStrLn $ "getNumCapabilities: " ++ show n -- test files are declared as data in BUILD.bazel - testsLocation <- locateRunfiles $ mainWorkspace "compiler/damlc/test-files" + testsLocation <- locateRunfiles $ mainWorkspace "compiler/damlc/tests/daml-test-files" damlTestFiles <- filter (".daml" `isExtensionOf`) <$> listFiles testsLocation -- only run Test.daml (see https://github.com/digital-asset/daml/issues/726) - bondTradingLocation <- locateRunfiles $ mainWorkspace "compiler/damlc/bond-trading" + bondTradingLocation <- locateRunfiles $ mainWorkspace "compiler/damlc/tests/bond-trading" let allTestFiles = damlTestFiles ++ [bondTradingLocation "Test.daml"] - let outdir = "compiler/dmalc/output" + let outdir = "compiler/damlc/output" createDirectoryIfMissing True outdir opts <- defaultOptionsIO (Just version) diff --git a/compiler/damlc/test-src/DA/Test/GenerateModuleTree.hs b/compiler/damlc/tests/src/DA/Test/GenerateModuleTree.hs similarity index 100% rename from compiler/damlc/test-src/DA/Test/GenerateModuleTree.hs rename to compiler/damlc/tests/src/DA/Test/GenerateModuleTree.hs diff --git a/compiler/damlc/test-src/DA/Test/ShakeIdeClient.hs b/compiler/damlc/tests/src/DA/Test/ShakeIdeClient.hs similarity index 100% rename from compiler/damlc/test-src/DA/Test/ShakeIdeClient.hs rename to compiler/damlc/tests/src/DA/Test/ShakeIdeClient.hs diff --git a/compiler/damlc/test-src/DA/Test/TastyMain.hs b/compiler/damlc/tests/src/DA/Test/TastyMain.hs similarity index 100% rename from compiler/damlc/test-src/DA/Test/TastyMain.hs rename to compiler/damlc/tests/src/DA/Test/TastyMain.hs diff --git a/compiler/damlc/cli-tests/DamlcTest.hs b/compiler/damlc/tests/src/DamlcTest.hs similarity index 100% rename from compiler/damlc/cli-tests/DamlcTest.hs rename to compiler/damlc/tests/src/DamlcTest.hs diff --git a/compiler/damlc/cli-tests/DamlcVisual.hs b/compiler/damlc/tests/src/DamlcVisual.hs similarity index 92% rename from compiler/damlc/cli-tests/DamlcVisual.hs rename to compiler/damlc/tests/src/DamlcVisual.hs index aea07f2d829e..15d5046c25ed 100644 --- a/compiler/damlc/cli-tests/DamlcVisual.hs +++ b/compiler/damlc/tests/src/DamlcVisual.hs @@ -18,8 +18,8 @@ main = defaultMain =<< unitTests unitTests :: IO TestTree unitTests = do withTempFile $ \path -> do - darPath <- locateRunfiles (mainWorkspace "compiler/damlc/visual-test-daml.dar") - dotFile <- locateRunfiles (mainWorkspace "compiler/damlc/cli-tests/visual/Basic.dot") + darPath <- locateRunfiles (mainWorkspace "compiler/damlc/tests/visual-test-daml.dar") + dotFile <- locateRunfiles (mainWorkspace "compiler/damlc/tests/visual/Basic.dot") return $ testGroup "making sure we do not add extra edges" [ goldenVsFile "dot file test" diff --git a/compiler/damlc/test-files/daml-ghc-deterministic.sh b/compiler/damlc/tests/src/daml-ghc-deterministic.sh similarity index 93% rename from compiler/damlc/test-files/daml-ghc-deterministic.sh rename to compiler/damlc/tests/src/daml-ghc-deterministic.sh index f0260309022a..f690d96f51b1 100755 --- a/compiler/damlc/test-files/daml-ghc-deterministic.sh +++ b/compiler/damlc/tests/src/daml-ghc-deterministic.sh @@ -1,5 +1,5 @@ -# Copyright (c) 2019, Digital Asset (Switzerland) GmbH and/or its affiliates. -# All rights reserved. +# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail # --- begin runfiles.bash initialization --- @@ -24,7 +24,7 @@ else fi # --- end runfiles.bash initialization --- -TESTS_DIR=$(dirname $(rlocation "$TEST_WORKSPACE/compiler/damlc/test-files/Examples.daml")) +TESTS_DIR=$(dirname $(rlocation "$TEST_WORKSPACE/compiler/damlc/tests/daml-test-files/Examples.daml")) damlc=$(rlocation "$TEST_WORKSPACE/$1") protoc=$(rlocation "$TEST_WORKSPACE/$2") @@ -60,3 +60,4 @@ $protoc --decode_raw < "$TMP_OUT/out_proj_1" > "$TMP_OUT/decoded_out_proj_1" $protoc --decode_raw < "$TMP_OUT/out_proj_2" > "$TMP_OUT/decoded_out_proj_2" diff -u "$TMP_OUT/decoded_out_proj_1" "$TMP_OUT/decoded_out_proj_2" diff -u "$TMP_OUT/out_proj_1" "$TMP_OUT/out_proj_2" + diff --git a/compiler/damlc/util.bzl b/compiler/damlc/tests/util.bzl similarity index 90% rename from compiler/damlc/util.bzl rename to compiler/damlc/tests/util.bzl index ec21e9bdeeb8..d402844c3654 100644 --- a/compiler/damlc/util.bzl +++ b/compiler/damlc/tests/util.bzl @@ -3,7 +3,7 @@ load("//bazel_tools:haskell.bzl", "da_haskell_test") -def _daml_ghc_compile_test_impl(ctx): +def _damlc_compile_test_impl(ctx): stack_opt = "-K" + ctx.attr.stack_limit if ctx.attr.stack_limit else "" heap_opt = "-M" + ctx.attr.heap_limit if ctx.attr.heap_limit else "" script = """ @@ -41,8 +41,8 @@ def _daml_ghc_compile_test_impl(ctx): runfiles = runfiles, )] -daml_ghc_compile_test = rule( - implementation = _daml_ghc_compile_test_impl, +damlc_compile_test = rule( + implementation = _damlc_compile_test_impl, attrs = { "srcs": attr.label_list(allow_files = True), "main": attr.label(allow_files = True), @@ -58,18 +58,18 @@ daml_ghc_compile_test = rule( test = True, ) -def daml_ghc_integration_test(name, main_function): +def damlc_integration_test(name, main_function): da_haskell_test( name = name, size = "large", - srcs = ["test-src/DA/Test/GHC.hs"], - src_strip_prefix = "test-src", + srcs = ["src/DA/Test/DamlcIntegration.hs"], + src_strip_prefix = "src", main_function = main_function, data = [ "//compiler/damlc/pkg-db", "//compiler/scenario-service/server:scenario_service_jar", "@jq_dev_env//:jq", - ":test-files", + ":daml-test-files", ":bond-trading", ], deps = [ @@ -81,10 +81,10 @@ def daml_ghc_integration_test(name, main_function): "//compiler/damlc/daml-lf-conversion", "//compiler/damlc/daml-opts:daml-opts-types", "//compiler/damlc/daml-opts", - "//compiler/damlc/test-utils", "//daml-lf/archive:daml_lf_haskell_proto", "//libs-haskell/bazel-runfiles", "//libs-haskell/da-hs-base", + "//libs-haskell/test-utils", ], hazel_deps = [ "aeson", diff --git a/compiler/damlc/cli-tests/visual/Basic.daml b/compiler/damlc/tests/visual/Basic.daml similarity index 100% rename from compiler/damlc/cli-tests/visual/Basic.daml rename to compiler/damlc/tests/visual/Basic.daml diff --git a/compiler/damlc/cli-tests/visual/Basic.dot b/compiler/damlc/tests/visual/Basic.dot similarity index 100% rename from compiler/damlc/cli-tests/visual/Basic.dot rename to compiler/damlc/tests/visual/Basic.dot diff --git a/compiler/lsp-tests/BUILD.bazel b/compiler/lsp-tests/BUILD.bazel index abda9996a0af..53f56fe42a40 100644 --- a/compiler/lsp-tests/BUILD.bazel +++ b/compiler/lsp-tests/BUILD.bazel @@ -34,8 +34,8 @@ da_haskell_test( visibility = ["//visibility:public"], deps = [ "//compiler/damlc/daml-ide-core", - "//compiler/damlc/test-utils", "//compiler/hie-core", "//libs-haskell/bazel-runfiles", + "//libs-haskell/test-utils", ], ) diff --git a/compiler/damlc/test-utils/BUILD.bazel b/libs-haskell/test-utils/BUILD.bazel similarity index 100% rename from compiler/damlc/test-utils/BUILD.bazel rename to libs-haskell/test-utils/BUILD.bazel diff --git a/compiler/damlc/test-utils/DA/Test/Util.hs b/libs-haskell/test-utils/DA/Test/Util.hs similarity index 100% rename from compiler/damlc/test-utils/DA/Test/Util.hs rename to libs-haskell/test-utils/DA/Test/Util.hs