diff --git a/compiler/test/dotc/pos-decompilation.blacklist b/compiler/test/dotc/pos-decompilation.blacklist new file mode 100644 index 000000000000..097f55b6717b --- /dev/null +++ b/compiler/test/dotc/pos-decompilation.blacklist @@ -0,0 +1,80 @@ +# Constant(Symbol) +desugar.scala +sip23-symbols.scala +t389.scala +t4812.scala +t4579.scala + +# assertion failed: asTerm called on not-a-Term val +cls.scala +escapes2.scala +existentials-harmful.scala +constrs.scala +i2051.scala +i2663.scala +i1318.scala +gui.scala +i1756.scala +i2218.scala +objXfun.scala +printTest.scala +paramAliases.scala +michel1.scala +nested.scala +philippe3.scala +t115.scala +t0017.scala +t0055.scala +t1075.scala +t267.scala +t247.scala +t1226.scala +t0039.scala +t8324.scala +t4062.scala +t8177b.scala +t803.scala +t3071.scala +t8177.scala +tangledCompanion.scala +templateParents.scala +t5384.scala +t9795.scala +alias.scala +t0032.scala +supercalls.scala +i1776.scala +i3638.scala +i618.scala + +# scala.MatchError: Type.RecursiveType +i3647.scala + +# Stackoverflow +avoid.scala +i1047.scala +i1181.scala + +# Stackoverflow on bootstrapped +large.scala +large2.scala + +# scala.MatchError: EmptyTree +depfuntype.scala +compound.scala +implicit-dep.scala +refinedSubtyping.scala +zoo2.scala +typers.scala +apply-equiv.scala +projections.scala +lookuprefined.scala + +# NPE +i2888.scala +tcpoly_overloaded.scala +tcpoly_boundedmonad.scala +tcpoly_checkkinds_mix.scala + +# scala.MatchError: This +infersingle.scala diff --git a/compiler/test/dotc/pos-from-tasty.blacklist b/compiler/test/dotc/pos-from-tasty.blacklist new file mode 100644 index 000000000000..80e74dfe27c1 --- /dev/null +++ b/compiler/test/dotc/pos-from-tasty.blacklist @@ -0,0 +1,14 @@ +# Wrong number of arguments (only on bootstrapped) +i3130b.scala + +# Missing position +collections_1.scala + +# MatchError in SymDenotation.sourceModule on a ThisType +t3612.scala + +# Fails on MacOS +annot-bootstrap.scala + +# ScalaRunTime cannot be unpickled because it is already loaded +repeatedArgs213.scala diff --git a/compiler/test/dotc/pos-recompilation.whitelist b/compiler/test/dotc/pos-recompilation.whitelist new file mode 100644 index 000000000000..3e33afd4878d --- /dev/null +++ b/compiler/test/dotc/pos-recompilation.whitelist @@ -0,0 +1,1032 @@ +A +Arrays +B +Bridges +Coder +CoderTrait +Foo +GenericTraversableTemplate +HelloWorld +KillLambdaLift +List1 +Map +Monoid +S1 +S3 +S5 +S8 +SI-4012-b +SI-5788 +SI-7060 +SI-7100 +X +Z +aliases +anonBridge +anonClassSubtyping +array-clone +array-interfaces +array-overload +arrays3 +autoTuplingTest +backquoted_type_operator +basicFromTasty +bigint +bubbleUpNothing +builders +byNameVarargs +capturedVars2 +caseClassInMethod +caseaccs +cfcrash +chan +checkInstantiable +class-dependent-extension-method +class-refinement +classWithCompObj +cls1 +clsrefine +collectGenericCC +comp-rec-test +companions +compile1 +conforms +conformsWild +constants +constfold +constraining-lub +contextbounds-implicits-old +contrib467 +curried +cyclics-pos +debug-reset-local-attrs +delambdafy-lambdalift +dependent-extractors +dependent-implicits +depmet_implicit_chaining_zw +depmet_implicit_norm_ret +dynamicExtendsNoImport +elidable-tparams +ensuring +enum-List-control +enum-interop +erased-args-lifted +erased-deep-context +erased-lub-2 +erased-typedef +erasure +erasure-array +erasure-nsquared +eta +exbound +exhaust_2 +exhaust_alternatives +explicitOuter +exponential-spec +extmethods +extractor-types +extractors +fbounds +finalvals +freezeBounds +function-arity +functions1 +gadts2 +gen-traversable-methods +getset +gosh +harmonize +hashhash-overloads +hk-deep-subtype +hk-reduce-variance +hk-subtyping +hkarray +hkgadt +hklub0 +homonym +hygiene +i0239 +i0268 +i0290-type-bind +i0306 +i0400 +i1036 +i1045 +i1052 +i1103 +i1130 +i1131 +i1174 +i1181b +i1181c +i1216 +i1216a +i1235 +i1269 +i1285 +i1307 +i1352 +i1366 +i1378 +i1385 +i1401 +i1432 +i1442 +i1444 +i1500 +i1515 +i1542 +i1544 +i1570 +i1590 +i1637 +i1638 +i1642 +i1661 +i1664 +i1687 +i1687b +i1704 +i1723 +i1737 +i1747 +i1751 +i1755 +i1765 +i1777 +i1793 +i1795 +i1797 +i1803 +i1865 +i1866 +i1867 +i1868 +i1891 +i1960 +i1961 +i1975 +i1990 +i2009 +i2056 +i2066 +i2071 +i2071_1 +i2081 +i2104 +i2104b +i2140 +i2188 +i2192 +i2201a +i2201c +i2212 +i2234 +i2292 +i2324 +i2345 +i2367 +i2378 +i239-packageObj +i2390 +i2426 +i2527 +i2527b +i262-null-subtyping +i2697 +i2732 +i2741 +i2745 +i2833 +i2856 +i2858 +i2903 +i2944 +i2945 +i2948 +i2949 +i2974 +i2981 +i2982 +i2989 +i2998 +i3050 +i3082 +i3129 +i3130a +i3130c +i3130d +i3149a +i3168 +i3171 +i324 +i3252 +i3343 +i3412 +i342 +i3433 +i3460 +i3471 +i3480 +i3488 +i3538 +i3540 +i3542-1 +i3542-2 +i3553 +i3561 +i3585 +i3588 +i3590 +i3591 +i3596 +i3597 +i3607 +i3608 +i3633 +i3702 +i3703 +i3736 +i3857 +i3873 +i3909 +i3917 +i3945 +i3956 +i3971 +i4177 +i4180 +i4198 +i4203 +i4318 +i4322 +i4350 +i4380b +i4395 +i4395b +i4396a +i4396b +i4414 +i4449 +i4493 +i4493-b +i4493-c +i4514 +i4526-2 +i4586 +i4623 +i4774c +i4774d +i480 +i480a +i518 +i523 +i536 +i540 +i566 +i576 +i739 +i743 +i782 +i815 +i830 +i831 +i851 +i864 +i877 +i878 +i880 +i903 +i938 +i939 +i947 +i974 +i998 +imp2-pos +implicit-anyval-2.10 +implicit-divergent +implicit-infix-ops +implicit-lower-bound +implicit-scope-loop +implicit-unwrap-tc +implicit_cache +implicit_tparam +implicitonSelect +implicits +implicits1 +inf +inferOverloaded +inferbroadtype +init +inline-case-intrinsics +inline-i2570 +inline-named-typeargs +inline-t2425 +inline-t9232a +inline-t9232b +inlineAccesses +inliner2 +irrefutable +itay +iterator-traversable-mix +kinds +kinzer +ksbug1 +lambda +lambdalift +lambdalift-1 +lambdalift1 +lambdalift_1 +largecasetest +lazyvals +leak-inferred +leaks +lexical +list-extractor +list-optim-check +listpattern +local-objects +localmodules +lookupswitch +macro-deprecate-dont-touch-backquotedidents +match +matthias3 +matthias4 +matthias5 +maxim1 +methodTypes +michel2 +michel3 +michel4 +michel5 +misc-unapply_pos +modules +modules1 +namedTypeParams +native-warning +needstypeearly +nested2 +nestedLambdas +new-array +news +nonlocal-unchecked +null +nullarify +nullary +nullary_poly +orinf +ostermann +overloaded +overloadedAccess +override-via-self +overrideDataRace +overrides +overzealous-assert-genbcode +packageobject +packageobjs +paramcycle +partialApplications +partialfun +pat_gilles +pat_iuli +patdef +patmat-extract-tparam +patterns1213 +patterns2 +philippe1 +philippe2 +philippe4 +pickleinf +poly-override +polyalias +polymorphic-case-class +polytypes +prefix +printbounds +privates +propagate +quote-1 +quote-lift-inline-params-b +quote-no-splices +range +rangepos +rangepos-anonapply +rangepos-patmat +rbtree +rebind +relax_implicit_divergence +resultGuidesInference +return_thistype +sammy_poly +sammy_scope +sammy_twice +sbtDotrTest +scoping1 +scoping2 +scoping3 +sealed-final +selftypes +sets +sigs +simple-exceptions +simple-repeated-args +simpleAnnot +simpleCaseClass-1 +simpleCaseClass-2 +simpleCaseClass-3 +simpleCaseObject +simpleClass +simpleClass-2 +simpleClass-3 +simpleConstructor +simpleDoWhile +simpleExtractors-1 +simpleExtractors-2 +simpleInline +simpleMatchCase +simpleMatchRef +simpleRefinement +simpleSetter +simpleSingleton +simpleSuper +simpleTry +simpleTypeSelect +simpleWhile +singletons +singletontrait +sort +spec +spec-Function1 +spec-arrays +spec-asseenfrom +spec-constr-new +spec-constr-old +spec-cyclic +spec-doubledef-old +spec-fields-old +spec-foo +spec-funs +spec-groups +spec-lists +spec-localdefs +spec-maps +spec-params-old +spec-partially +spec-partialmap +spec-polymeth +spec-private +spec-short +spec-super +spec-t3497 +spec-t6286 +spec-tailcall +spec-thistype +spec-vector +specialize10 +spurious-overload +staleSymbol +strip-tvars-for-lubbasetypes +subtyping +sudoku +switch-small +switchUnbox +synthetics +t0002 +t0020 +t0029 +t0030 +t0031 +t0049 +t0053 +t0054 +t0061 +t0064 +t0066 +t0068 +t0069 +t0076 +t0081 +t0082 +t0085 +t0091 +t0093 +t0123 +t0154 +t0165 +t0204 +t0227 +t0273 +t0301 +t0304 +t0438 +t0453 +t0504 +t0591 +t0599 +t0644 +t0654 +t0674 +t0710 +t0770 +t0786 +t0851 +t0872 +t0904 +t0905 +t1000 +t1006 +t1027 +t1034 +t1048 +t1049 +t10533 +t1056 +t1070 +t1090 +t1107a +t1119 +t1123 +t112606A +t1131 +t1133 +t1146 +t1159 +t116 +t1164 +t1168 +t1185 +t119 +t1203a +t121 +t1210a +t122 +t1236a +t124 +t1260 +t1272 +t1318 +t1385 +t1391 +t1422_pos +t1439 +t1480 +t1500a +t151 +t1513a +t1513b +t1560 +t1565 +t1569 +t1569a +t159 +t1591_pos +t160 +t1625 +t1625b +t1642b +t1659 +t1675 +t1693 +t1722-A +t175 +t1756 +t177 +t1785 +t1786-counter +t1786-cycle +t1789 +t1798 +t183 +t1832 +t1843 +t1858 +t1987a +t1996 +t201 +t2018 +t2023 +t2060 +t2081 +t2082 +t2094 +t210 +t211 +t2119 +t2127 +t2133 +t2171 +t2183 +t2187 +t2187-2 +t2194 +t2208_pos +t2234 +t2260 +t2261 +t229 +t2293 +t2305 +t2331 +t2405 +t2421 +t2421_delitedsl +t2421b_pos +t2421c +t2425 +t2429 +t245 +t2486 +t2500 +t2504 +t252 +t2545 +t2591 +t2619 +t262 +t2624 +t2635 +t2665 +t2667 +t2669 +t2683 +t2691 +t2693 +t2708 +t2712-1 +t2712-2 +t2712-4 +t2712-6 +t2794 +t2795-new +t2795-old +t2797 +t2799 +t2809 +t284-pos +t287 +t289 +t2913 +t2939 +t2945 +t296 +t2973 +t2991 +t3020 +t304 +t3079 +t3106 +t3136 +t3137 +t3160 +t3174b +t318 +t319 +t3252 +t3274 +t3278 +t3312 +t3371 +t3373 +t3411 +t3420 +t3430 +t344 +t3440 +t3452f +t3477 +t348plus +t3494 +t3495 +t3498-new +t3534 +t3560 +t3570 +t3578 +t3582 +t3582b +t359 +t360 +t361 +t3631 +t3636 +t3670 +t3671 +t3676 +t3688 +t372 +t374 +t3774 +t3792 +t3800 +t3808 +t3837 +t3859 +t3861 +t3869 +t3880 +t3883 +t3890 +t3898 +t3924 +t3927 +t397 +t3972 +t3986 +t402 +t4020 +t4036 +t4052 +t4070 +t4112 +t415 +t4173 +t4176 +t4188 +t419 +t4220 +t4243 +t4257 +t4266 +t4269 +t4275 +t430-feb09 +t4305 +t432 +t4336 +t439 +t443 +t4430 +t4432 +t4494 +t4501 +t4524 +t4545 +t4547 +t4593 +t460 +t464 +t4651 +t4692 +t4716 +t4717 +t4758 +t4760 +t4786 +t4840 +t4853 +t4859 +t4869 +t4910 +t4911 +t4938 +t4975 +t5012 +t5029 +t5031_2 +t5041 +t5070 +t5071 +t5084 +t5099 +t5127 +t5137 +t514 +t516 +t5175 +t522 +t5240 +t5245 +t5305 +t5313 +t5330b +t5399a +t5444 +t5508 +t5508-min +t5508-min-okay +t5508-min-okay2 +t5542 +t5577 +t5606 +t5643 +t566 +t5683 +t5726 +t5769 +t5779-numeq-warn +t5796 +t5829 +t5846 +t5859 +t5862 +t5886 +t5897 +t5910 +t592 +t5930 +t5932 +t596 +t5967 +t5968 +t599 +t6008 +t6022 +t6033 +t604 +t607 +t6072 +t6091 +t611 +t6117 +t613 +t6145 +t6146 +t615 +t6157 +t616 +t6184 +t6201 +t6205 +t6208 +t6210 +t6225 +t6225b +t6231 +t6231b +t6274 +t6275 +t6278-synth-def +t628 +t6301 +t6311 +t6335 +t640 +t6482 +t651 +t6514 +t6537 +t6547 +t6551 +t6552 +t6595 +t6600 +t6664 +t6664b +t6675 +t6712 +t6722 +t6745 +t675 +t6771 +t6780 +t6815 +t6815_import +t684 +t6896 +t690 +t6925 +t694 +t6963c +t6966 +t697 +t698 +t7011 +t7022 +t704 +t7091 +t7180 +t7183 +t720 +t7200b +t7233 +t7233b +t7285a +t7296 +t7369 +t7377b +t7427 +t7433 +t7486 +t7520 +t756 +t757 +t757a +t758 +t759 +t762 +t7668 +t767 +t7689 +t7690 +t7716 +t7782 +t7782b +t7788 +t780 +t7853 +t7853-partial-function +t788 +t7928 +t796 +t8023 +t8023b +t8045 +t805 +t8054 +t8060 +t807 +t812 +t8120 +t8128 +t8132 +t8177d +t8177e +t8177g +t8177h +t8219 +t8230a +t8237 +t8300-conversions-a +t8300-conversions-b +t8300-overloading +t8300-patmat-a +t8300-patmat-b +t8301 +t8301b +t8306 +t8315 +t8315b +t8363 +t8364 +t8367 +t8369a +t839 +t851 +t873 +t892 +t9004 +t911 +t927 +t946 +t9844 +tcpoly_bounds1 +tcpoly_gm +tcpoly_higherorder_bound_method +tcpoly_infer_ticket474 +tcpoly_late_method_params +tcpoly_method +tcpoly_param_scoping +tcpoly_poly +tcpoly_return_overriding +tcpoly_subst +tcpoly_typesub +tcpoly_wildcards +ted +test1 +test4refine +test5refine +testCoercionThis +testcast +this-types +thistype +thistypes +ticket2201 +tparam_inf +trait-parents +traits +tryWithoutHandler +typealias_dubious +typealiases +typedapply +typeinferNull +typerep_pos +typetags +typetestcast +unapply +unapplyContexts2 +unapplyGeneric +unapplyNeedsMemberType +unapplyVal +unchecked-a +valdefs +vararg-pattern +variances +variances-flip +variances_pos +virtpatmat_alts_subst +virtpatmat_anonfun_for +virtpatmat_binding_opt +virtpatmat_castbinder +virtpatmat_exhaust +virtpatmat_exhaust_unchecked +virtpatmat_exist1 +virtpatmat_exist2 +virtpatmat_exist3 +virtpatmat_exist_uncurry +virtpatmat_gadt_array +virtpatmat_infer_single_1 +virtpatmat_reach_const +widen-existential +wildcardBoundInference +wildcardInInfixType +zoo diff --git a/compiler/test/dotc/run-decompilation.blacklist b/compiler/test/dotc/run-decompilation.blacklist new file mode 100644 index 000000000000..42c825d738dc --- /dev/null +++ b/compiler/test/dotc/run-decompilation.blacklist @@ -0,0 +1,51 @@ +# asTerm called on not-a-Term val +t5045.scala +mixins.scala +t6666a.scala +t4777.scala +t6957.scala +t8177f.scala +Course-2002-06.scala +implicits_poly.scala +tcpoly_parseridioms.scala +t4062.scala +paramForwarding.scala +t6506.scala +i1692.scala +caseclasses.scala +i2883.scala +t6793.scala +i2163.scala +planets.scala +view-iterator-stream.scala +enums.scala +NestedClasses.scala +paramForwarding_together.scala +paramForwarding_together_b.scala +t629.scala +i763.scala +t0883.scala +absoverride.scala +t3048.scala +t3619.scala +t3651.scala +protectedacc.scala +t7436.scala + +# Constant(Symbol) +fors.scala +t6634.scala +t6632.scala +t4601.scala +t6633.scala +arrays.scala + +# scala.MatchError: SeqLiteral in pattern +i3248.scala +t6541.scala + +# scala.MatchError: This +t6104.scala + +# Stackoverflow +t10594.scala diff --git a/compiler/test/dotc/run-from-tasty.blacklist b/compiler/test/dotc/run-from-tasty.blacklist new file mode 100644 index 000000000000..46615b510186 --- /dev/null +++ b/compiler/test/dotc/run-from-tasty.blacklist @@ -0,0 +1,2 @@ +# Closure type miss match +eff-dependent.scala diff --git a/compiler/test/dotc/run-recompilation.whitelist b/compiler/test/dotc/run-recompilation.whitelist new file mode 100644 index 000000000000..f67c4bc5d7d8 --- /dev/null +++ b/compiler/test/dotc/run-recompilation.whitelist @@ -0,0 +1,685 @@ +1938 +1938-2 +3179 +Course-2002-01 +Course-2002-02 +Course-2002-04 +Course-2002-05 +Course-2002-07 +Course-2002-09 +Course-2002-10 +Course-2002-13 +HLists +HLists-nonvariant +Lazies1 +Lazies2 +LazyValsLongs +MultiArr +MutableListTest +OrderingTest +Predef.readLine +PrivateAnd +QueueTest +ReplacementMatching +ReverseSeqView +StackMap +UnrolledBuffer +array-existential-bound +arrayclone-new +arraycopy +arrayview +arybufgrow +bigDecimalCache +bigDecimalTest +blame_eye_triple_eee-double +blame_eye_triple_eee-float +boolexprs +boolord +breakout +buffer-slice +byname-param +classTags +classmanifests_new_alias +classmanifests_new_core +classof +classtags_contextbound +cochis +collection-stacks +collections +collections-toSelf +colltest +comparable-comparator +complicatedmatch +concat-two-strings +constant-optimization +constructors +contrarivant +contrib674 +coop-equality +dead-code-elimination +deadlock +deeps +defaultGetters +delambdafy-nested-by-name +delambdafy-two-lambdas +delayedInit +double-pattern-type +drop-no-effects +duration-coarsest +dynamic-anyval +elidable-noflags +empty-array +emptypf +enum-Color +erased-1 +erased-10 +erased-11 +erased-12 +erased-13 +erased-14 +erased-15 +erased-16 +erased-22 +erased-25 +erased-26 +erased-27 +erased-28 +erased-5 +erased-6 +erased-7 +erased-8 +erased-9 +erased-frameless +erased-poly-ref +erased-select-prefix +exc +exc1 +exc2 +exceptions +exceptions-2 +exceptions-nest +final-fields +final-var +finally +fully-abstract-interface +fully-abstract-nat-1 +fully-abstract-nat-3 +functionXXL +future-flatmap-exec-count +gadts +genericValueClass +getClassTest-valueClass +groupby +hashCodeDistribution +hashhash +hashsetremove +hello +i1099 +i1240 +i1263 +i1284 +i1386 +i1387 +i1423 +i1432 +i1490 +i1543 +i1569 +i1573 +i1732 +i1732_1 +i1820 +i1820b +i1915 +i1960 +i1990b +i1991 +i2004 +i2004b +i2020 +i2077 +i2147 +i2156 +i2314 +i2337 +i2337b +i2396 +i2396b +i2396c +i2456 +i2508 +i2738 +i2895 +i2939 +i2964 +i2964b +i2964c +i2964d +i2964e +i3000b +i3006 +i3006b +i3018 +i3396 +i3518 +i3548 +i3624 +i3930 +i4037 +i4177 +i4205 +i4430 +i4446 +i4496a +i4496b +i4600b +i4754 +i659 +i689 +i744 +i764 +i789 +i806 +i876 +impconvtimes +implicitclasses +implicits +implicits-numeric +imports +indexedSeq-apply +infiniteloop +inlineArrowAssoc +inlineForeach +inliner-infer +innerClass +innerObject +interop_classtags_are_classmanifests +interpolationArgs +intmap +is-valid-num +isInstanceOf-eval +iterables +iterator-concat +iterator-iterate-lazy +iterator3444 +iterators +kmpSliceSearch +lambda-null +lambda-sam-bridge +lambda-unit +lazy-override-run +lazy-traits +lazyVals +lift-and-unlift +list_map +lists-run +literals +llift +longmap +mapConserve +mapValues +map_test +matcharraytail +matchbytes +matchemptyarray +matchintasany +matchnull +matchonseq +matchonstream +missingparams +mixin-primitive-on-generic-2 +mixin-primitive-on-generic-5 +multi-array +nats +nestedEq +non-jvm-sam-non-apply +nonLocalReturns +nonlocalreturn +nothingTypeDce +nothingTypeNoFramesNoDce +nothingTypeNoOpt +nullAsInstanceOf +nullInstanceEval +numbereq +numeric-range +optimizer-array-load +option-fold +ordered +overload_directly_applicable +parmap-ops +partialFunctions +patch-boundary +patmat-finally +patmat-option-named +patmat-spec +patmatch-classtag +phantomValueClass +priorityQueue +promotion +proxy +pure-args-byname-noinline +puzzle +puzzler54 +range +range-unit +rawstrings +reducable +redundantParents +retclosure +retsynch +richWrapperEquals +richs +rooted_stringcontext +run-bug4840 +runtime-richChar +sammy_repeated +scala2mixins +scala2trait-lazyval +scan +seqlike-kmp +serialize +serialize-stream +simpleClass +singletons +slice-strings +sort +spec-self +static-module-method +statics +stream-stack-overflow-filter-map +streamWithFilter +stream_flatmap_odds +stringbuilder-drop +structuralNoSuchMethod +switches +sysprops +t0005 +t0042 +t0048 +t0325 +t0607 +t0631 +t0668 +t0677-old +t0807 +t0936 +t1005 +t10170 +t1044 +t1048 +t107 +t1074 +t1192 +t1220 +t1300 +t1309 +t1323 +t1333 +t1373 +t1381 +t1423 +t1434 +t1466 +t1500b +t1500c +t1505 +t1524 +t153 +t1535 +t1672 +t1697 +t1718 +t1747 +t1829 +t1909b +t1909c +t1939 +t1987 +t1994 +t2005 +t2027 +t2074_2 +t2075 +t2087-and-2400 +t2111 +t2127 +t2147 +t216 +t2175 +t2176 +t2177 +t2212 +t2255 +t2316_run +t2378 +t2418 +t2446 +t2488 +t2524 +t2526 +t2544 +t2552 +t266 +t2754 +t2755 +t2813.2 +t2818 +t2849 +t2857 +t2876 +t2958 +t298 +t3004 +t3026 +t3038 +t3038b +t3038d +t3088 +t3097 +t3112 +t3126 +t3186 +t3232 +t3235-minimal +t3241 +t3242b +t3269 +t3273 +t3326 +t3327 +t3346a +t3346d +t3346h +t3395 +t3397 +t3452 +t3452c +t3452f +t3452h +t3487 +t3488 +t3493 +t3496 +t3502 +t3508 +t3509 +t3511 +t3516 +t3518 +t3529 +t3540 +t3563 +t3580 +t3616 +t363 +t3645 +t3647 +t3670 +t3687 +t3702 +t3714 +t3719 +t3726 +t3760 +t3761-overload-byname +t3763 +t3829 +t3832 +t3835 +t3855 +t3877 +t3887 +t3895 +t3923 +t3935 +t3950 +t3970 +t3980 +t3984 +t3994 +t3996 +t4013 +t4013b +t4013c +t4023 +t4027 +t4054 +t408 +t4080 +t4122 +t4147 +t4148 +t4190 +t4201 +t429 +t4297 +t4300 +t4332b +t4351 +t4398 +t4400 +t4415 +t4482 +t4535 +t4558 +t4565_1 +t4570 +t4577 +t4592 +t4656 +t4660 +t4697 +t4709 +t4723 +t4742 +t4750 +t4753 +t4770 +t4809 +t4827 +t4827b +t4859 +t4871 +t4894 +t4895 +t4897 +t493 +t4930 +t4954 +t498 +t5009 +t5037 +t5040 +t5105 +t5158 +t5162 +t5171 +t5262 +t5284b +t5284c +t5300 +t5328 +t5377 +t5387 +t5394 +t5407 +t5428 +t5530 +t5552 +t5588 +t5590 +t5604 +t5608 +t5610a +t5612 +t5629 +t5629b +t5656 +t5665 +t5680 +t5804 +t5830 +t5856 +t5857 +t5866 +t5923c +t5937 +t594 +t5971 +t5974 +t5986 +t601 +t6011b +t6011c +t603 +t6064 +t6070 +t6077_patmat_cse_irrefutable +t6089 +t6090 +t6114 +t6126 +t6154 +t6188 +t6196 +t6197 +t6198 +t6200 +t6206 +t6246 +t6260 +t627 +t6271 +t6272 +t6292 +t6333 +t6337a +t6353 +t6355 +t6370 +t6385 +t6406-regextract +t6443-by-name +t6443b +t6500 +t6534 +t6559 +t6574b +t6584 +t6614 +t6628 +t6637 +t6644 +t6646 +t6663 +t6673 +t6706 +t6827 +t6888 +t6928-run +t6968 +t7019 +t7126 +t7171 +t7200 +t7215 +t7223 +t7231 +t7249 +t7269 +t7278 +t7300 +t7326 +t7336 +t7341 +t7406 +t7407 +t7407b +t7445 +t7498 +t751 +t7685-class-simple +t7763 +t7880 +t7912 +t7985 +t7985b +t7992 +t7992b +t8002 +t8015-ffc +t8100 +t8153 +t8188 +t8197 +t8197b +t8233 +t8233-bcode +t8245 +t8280 +t8428 +t8570 +t8570a +t8601 +t8601b +t8601c +t8601d +t8607 +t8610 +t8611a +t8611b +t8611c +t8680 +t8690 +t8738 +t8823 +t8845 +t8888 +t889 +t8893 +t8893b +t8933c +t920 +t920_1 +t949 +t978 +takeAndDrop +tcpoly_overriding +traitInit +traitParamInit +traits-initialization +transform +transpose +triemap-hash +triple-quoted-expr +try-2 +try-catch-unify +tuple-match +tuple-zipped +typealias_overriding +unapply +unapplyArray +unboxingBug +unittest_collection +unreachable +value-class-partial-func-depmet +valueclasses-classmanifest-basic +valueclasses-constr +valueclasses-pavlov +vc-equals +verify-ctor +virtpatmat_alts +virtpatmat_apply +virtpatmat_casting +virtpatmat_literal +virtpatmat_npe +virtpatmat_opt_sharing +virtpatmat_partial_backquoted +virtpatmat_switch +virtpatmat_tailcalls_verifyerror +virtpatmat_try +virtpatmat_typed +virtpatmat_unapply +virtpatmat_unapplyseq +weakconform +zero-arity-case-class diff --git a/compiler/test/dotty/tools/StdLibSources.scala b/compiler/test/dotty/tools/StdLibSources.scala deleted file mode 100644 index 57778dd50738..000000000000 --- a/compiler/test/dotty/tools/StdLibSources.scala +++ /dev/null @@ -1,34 +0,0 @@ -package dotty.tools - -import java.io.File -import scala.io.Source -import org.junit.Test -import org.junit.Assert._ - -object StdLibSources { - - private final val stdLibPath = "scala2-library/src/library/" - - def blacklistFile: String = "compiler/test/dotc/scala-collections.blacklist" - - def whitelisted: List[String] = all.diff(blacklisted) - def blacklisted: List[String] = loadList(blacklistFile) - - def all: List[String] = { - def collectAllFilesInDir(dir: File, acc: List[String]): List[String] = { - val files = dir.listFiles() - val acc2 = files.foldLeft(acc)((acc1, file) => if (file.isFile && file.getPath.endsWith(".scala")) file.getPath :: acc1 else acc1) - files.foldLeft(acc2)((acc3, file) => if (file.isDirectory) collectAllFilesInDir(file, acc3) else acc3) - } - collectAllFilesInDir(new File(stdLibPath), Nil) - } - - private def loadList(path: String): List[String] = Source.fromFile(path, "UTF8").getLines() - .map(_.trim) // allow identation - .filter(!_.startsWith("#")) // allow comment lines prefixed by # - .map(_.takeWhile(_ != '#').trim) // allow comments in the end of line - .filter(_.nonEmpty) - .map(stdLibPath + _) - .toList - -} diff --git a/compiler/test/dotty/tools/TestSources.scala b/compiler/test/dotty/tools/TestSources.scala new file mode 100644 index 000000000000..540bc9a1f56a --- /dev/null +++ b/compiler/test/dotty/tools/TestSources.scala @@ -0,0 +1,56 @@ +package dotty.tools + +import java.io.File + +import scala.io.Source + +object TestSources { + + // Std Lib + + private final val stdLibPath = "scala2-library/src/library/" + + private def blacklistFile: String = "compiler/test/dotc/scala-collections.blacklist" + + def stdLibWhitelisted: List[String] = all.diff(stdLibBlacklisted) + def stdLibBlacklisted: List[String] = loadList(blacklistFile).map(stdLibPath + _) + + private def all: List[String] = { + def collectAllFilesInDir(dir: File, acc: List[String]): List[String] = { + val files = dir.listFiles() + val acc2 = files.foldLeft(acc)((acc1, file) => if (file.isFile && file.getPath.endsWith(".scala")) file.getPath :: acc1 else acc1) + files.foldLeft(acc2)((acc3, file) => if (file.isDirectory) collectAllFilesInDir(file, acc3) else acc3) + } + collectAllFilesInDir(new File(stdLibPath), Nil) + } + + // pos tests lists + + def posFromTastyBlacklistFile: String = "compiler/test/dotc/pos-from-tasty.blacklist" + def posDecompilationBlacklistFile: String = "compiler/test/dotc/pos-decompilation.blacklist" + def posRecompilationWhitelistFile: String = "compiler/test/dotc/pos-recompilation.whitelist" + + def posFromTastyBlacklisted: List[String] = loadList(posFromTastyBlacklistFile) + def posDecompilationBlacklisted: List[String] = loadList(posDecompilationBlacklistFile) + def posRecompilationWhitelist: List[String] = loadList(posRecompilationWhitelistFile) + + // run tests lists + + def runFromTastyBlacklistFile: String = "compiler/test/dotc/run-from-tasty.blacklist" + def runDecompilationBlacklistFile: String = "compiler/test/dotc/run-decompilation.blacklist" + def runRecompilationWhitelistFile: String = "compiler/test/dotc/run-recompilation.whitelist" + + def runFromTastyBlacklisted: List[String] = loadList(runFromTastyBlacklistFile) + def runDecompilationBlacklisted: List[String] = loadList(runDecompilationBlacklistFile) + def runRecompilationWhitelist: List[String] = loadList(runRecompilationWhitelistFile) + + // load lists + + private def loadList(path: String): List[String] = Source.fromFile(path, "UTF8").getLines() + .map(_.trim) // allow identation + .filter(!_.startsWith("#")) // allow comment lines prefixed by # + .map(_.takeWhile(_ != '#').trim) // allow comments in the end of line + .filter(_.nonEmpty) + .toList + +} \ No newline at end of file diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 1efccb4ac3d2..10055f39aa72 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -34,12 +34,12 @@ class CompilationTests extends ParallelTesting { // @Test // enable to test compileStdLib separately with detailed stats def compileStdLibOnly: Unit = { implicit val testGroup: TestGroup = TestGroup("compileStdLibOnly") - compileList("compileStdLib", StdLibSources.whitelisted, scala2Mode.and("-migration", "-Yno-inline", "-Ydetailed-stats")) + compileList("compileStdLib", TestSources.stdLibWhitelisted, scala2Mode.and("-migration", "-Yno-inline", "-Ydetailed-stats")) }.checkCompile() @Test def compilePos: Unit = { implicit val testGroup: TestGroup = TestGroup("compilePos") - compileList("compileStdLib", StdLibSources.whitelisted, scala2Mode.and("-migration", "-Yno-inline")) + + compileList("compileStdLib", TestSources.stdLibWhitelisted, scala2Mode.and("-migration", "-Yno-inline")) + compileDir("compiler/src/dotty/tools/dotc/ast", defaultOptions) + compileDir("compiler/src/dotty/tools/dotc/config", defaultOptions) + compileDir("compiler/src/dotty/tools/dotc/core", defaultOptions) + diff --git a/compiler/test/dotty/tools/dotc/FromTastyTests.scala b/compiler/test/dotty/tools/dotc/FromTastyTests.scala index f4817fee9876..a79813411a2a 100644 --- a/compiler/test/dotty/tools/dotc/FromTastyTests.scala +++ b/compiler/test/dotty/tools/dotc/FromTastyTests.scala @@ -27,24 +27,9 @@ class FromTastyTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("posTestFromTasty") compileTastyInDir("tests/pos", defaultOptions, - blacklist = Set( - // Wrong number of arguments (only on bootstrapped) - "i3130b.scala", - - // Missing position - "collections_1.scala", - - // MatchError in SymDenotation.sourceModule on a ThisType - "t3612.scala", - - // Fails on MacOS - "annot-bootstrap.scala", - - // ScalaRunTime cannot be unpickled because it is already loaded - "repeatedArgs213.scala", - ), - recompilationBlacklist = Set( - ) + fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted), + decompilationFilter = FileFilter.exclude(TestSources.posDecompilationBlacklisted), + recompilationFilter = FileFilter.include(TestSources.posRecompilationWhitelist) ).checkCompile() } @@ -56,11 +41,9 @@ class FromTastyTests extends ParallelTesting { implicit val testGroup: TestGroup = TestGroup("runTestFromTasty") compileTastyInDir("tests/run", defaultOptions, - blacklist = Set( - // Closure type miss match - "eff-dependent.scala", - ), - recompilationBlacklist = Set() + fromTastyFilter = FileFilter.exclude(TestSources.runFromTastyBlacklisted), + decompilationFilter = FileFilter.exclude(TestSources.runDecompilationBlacklisted), + recompilationFilter = FileFilter.include(TestSources.runRecompilationWhitelist) ).checkRuns() } } diff --git a/compiler/test/dotty/tools/vulpix/FileFilter.scala b/compiler/test/dotty/tools/vulpix/FileFilter.scala new file mode 100644 index 000000000000..b1c58469d78c --- /dev/null +++ b/compiler/test/dotty/tools/vulpix/FileFilter.scala @@ -0,0 +1,22 @@ +package dotty.tools.vulpix + +sealed trait FileFilter { + def accept(file: String): Boolean +} + +object FileFilter { + + def exclude(files: List[String]): FileFilter = new FileFilter { + private[this] val blackList = files.toSet + def accept(file: String): Boolean = !blackList.contains(file) + } + + def include(files: List[String]): FileFilter = new FileFilter { + private[this] val whiteList = files.toSet + def accept(file: String): Boolean = whiteList.contains(file) + } + + object NoFilter extends FileFilter { + def accept(file: String) = true + } +} diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 85b1abeb5b7a..57a5bad60079 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -1125,9 +1125,9 @@ trait ParallelTesting extends RunnerOrchestration { self => } /** Separates directories from files and returns them as `(dirs, files)` */ - private def compilationTargets(sourceDir: JFile, blacklist: Set[String] = Set.empty): (List[JFile], List[JFile]) = + private def compilationTargets(sourceDir: JFile, fileFilter: FileFilter = FileFilter.NoFilter): (List[JFile], List[JFile]) = sourceDir.listFiles.foldLeft((List.empty[JFile], List.empty[JFile])) { case ((dirs, files), f) => - if (blacklist(f.getName)) (dirs, files) + if (!fileFilter.accept(f.getName)) (dirs, files) else if (f.isDirectory) (f :: dirs, files) else if (isSourceFile(f)) (dirs, f :: files) else (dirs, files) @@ -1225,12 +1225,12 @@ trait ParallelTesting extends RunnerOrchestration { self => * - Directories can have an associated check-file, where the check file has * the same name as the directory (with the file extension `.check`) */ - def compileFilesInDir(f: String, flags: TestFlags, blacklist: Set[String] = Set.empty)(implicit testGroup: TestGroup): CompilationTest = { + def compileFilesInDir(f: String, flags: TestFlags, fileFilter: FileFilter = FileFilter.NoFilter)(implicit testGroup: TestGroup): CompilationTest = { val outDir = defaultOutputDir + testGroup + "/" val sourceDir = new JFile(f) checkRequirements(f, sourceDir, outDir) - val (dirs, files) = compilationTargets(sourceDir, blacklist) + val (dirs, files) = compilationTargets(sourceDir, fileFilter) val targets = files.map(f => JointCompilationSource(testGroup.name, Array(f), flags, createOutputDirsForFile(f, sourceDir, outDir))) ++ @@ -1260,14 +1260,14 @@ trait ParallelTesting extends RunnerOrchestration { self => * Tests in the first part of the tuple must be executed before the second. * Both testsRequires explicit delete(). */ - def compileTastyInDir(f: String, flags0: TestFlags, blacklist: Set[String], recompilationBlacklist: Set[String])( + def compileTastyInDir(f: String, flags0: TestFlags, fromTastyFilter: FileFilter, decompilationFilter: FileFilter, recompilationFilter: FileFilter)( implicit testGroup: TestGroup): TastyCompilationTest = { val outDir = defaultOutputDir + testGroup + "/" val flags = flags0 and "-Yretain-trees" val sourceDir = new JFile(f) checkRequirements(f, sourceDir, outDir) - val (dirs, files) = compilationTargets(sourceDir, blacklist) + val (dirs, files) = compilationTargets(sourceDir, fromTastyFilter) val filteredFiles = testFilter match { case Some(str) => files.filter(_.getAbsolutePath.contains(str)) @@ -1282,14 +1282,14 @@ trait ParallelTesting extends RunnerOrchestration { self => val targets2 = filteredFiles - .filter(f => dotty.tools.io.File(f.toPath).changeExtension("decompiled").exists) + .filter(f => decompilationFilter.accept(f.getName)) .map { f => val classpath = createOutputDirsForFile(f, sourceDir, outDir) JointCompilationSource(testGroup.name, Array(f), flags.withClasspath(classpath.getPath), classpath, decompilation = true) } // Create a CompilationTest and let the user decide whether to execute a pos or a neg test - val generateClassFiles = compileFilesInDir(f, flags0, blacklist) + val generateClassFiles = compileFilesInDir(f, flags0, fromTastyFilter) val decompilationDir = outDir + sourceDir.getName + "_decompiled" @@ -1300,24 +1300,24 @@ trait ParallelTesting extends RunnerOrchestration { self => generateClassFiles.keepOutput, new CompilationTest(targets).keepOutput, new CompilationTest(targets2).keepOutput, - recompilationBlacklist, + recompilationFilter, decompilationDir, shouldDelete = true ) } class TastyCompilationTest(step1: CompilationTest, step2: CompilationTest, step3: CompilationTest, - recompilationBlacklist: Set[String], decompilationDir: String, shouldDelete: Boolean)(implicit testGroup: TestGroup) { + recompilationFilter: FileFilter, decompilationDir: String, shouldDelete: Boolean)(implicit testGroup: TestGroup) { def keepOutput: TastyCompilationTest = - new TastyCompilationTest(step1, step2, step3, recompilationBlacklist, decompilationDir, shouldDelete) + new TastyCompilationTest(step1, step2, step3, recompilationFilter, decompilationDir, shouldDelete) def checkCompile()(implicit summaryReport: SummaryReporting): this.type = { step1.checkCompile() // Compile all files to generate the class files with tasty step2.checkCompile() // Compile from tasty step3.checkCompile() // Decompile from tasty - val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationBlacklist).keepOutput + val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationFilter).keepOutput step4.checkCompile() // Recompile decompiled code if (shouldDelete) @@ -1331,7 +1331,7 @@ trait ParallelTesting extends RunnerOrchestration { self => step2.checkRuns() // Compile from tasty step3.checkCompile() // Decompile from tasty - val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationBlacklist).keepOutput + val step4 = compileFilesInDir(decompilationDir, defaultOptions, recompilationFilter).keepOutput step4.checkRuns() // Recompile decompiled code if (shouldDelete) diff --git a/doc-tool/test/WhitelistedStdLib.scala b/doc-tool/test/WhitelistedStdLib.scala index d59457605a28..36a967997215 100644 --- a/doc-tool/test/WhitelistedStdLib.scala +++ b/doc-tool/test/WhitelistedStdLib.scala @@ -32,6 +32,6 @@ class TestWhitelistedCollections extends DottyDocTest { object TestWhitelistedCollections { val files: List[String] = - StdLibSources.whitelisted + TestSources.stdLibWhitelisted .filterNot(_.endsWith("package.scala")) }