Skip to content

gulp baseline-accept does not update a few files #33364

Closed

Description

Search Terms: gulp baseline-accept test difference

Code

13b635d

I've been running gulp runtests and the more specific gulp runtests --tests=declarationMapsEnableMapping_NoInlineSources locally, followed by gulp baseline-accept.

Edit: by the way, this is on cmd and cmder with the native Windows 10 shell on Windows 10 Pro.

Expected behavior:

The baselines should be updated.

Actual behavior:

They are not. 🙁

See these errors: https://typescript.visualstudio.com/TypeScript/_build/results?buildId=43457

Am I expected to manually baseline them? It'd be swell to automate it...

Related Issues:

#4697, #14213, #29297

Activity

  1. changed the title [-]gulp baseline-accept does not update [/-] [+]gulp baseline-accept does not update a few files[/+] on Sep 11, 2019
  2. ajafff commented on Sep 11, 2019

    @ajafff
    Contributor

    There's a skipPercent flag that allows your local tests to finish faster. As the name suggests, it skips some tests that might still fail in CI. Setting it to 0 should fix your issue

  3. JoshuaKGoldberg commented on Sep 11, 2019

    @JoshuaKGoldberg
    ContributorAuthor

    Hmm, the tests are still running locally, that doesn't seem to be helping.

    Output from declarationMapsEnableMapping_NoInlineSources

    C:\Code\typescript (class-proto-caches -> origin) (typescript@3.7.0)
    λ gulp runtests --tests=declarationMapsEnableMapping_NoInlineSources --skipPercent 0 & gulp baseline-accept
    [06:07:01] Using gulpfile C:\Code\typescript\gulpfile.js
    [06:07:01] Starting 'runtests'...
    [06:07:01] Starting 'generateLibs'...
    [06:07:01] Starting 'buildScripts'...
    [06:07:02] Finished 'generateLibs' after 321 ms
    [06:07:02] Finished 'buildScripts' after 368 ms
    [06:07:02] Starting 'generateDiagnostics'...
    [06:07:02] Finished 'generateDiagnostics' after 1.89 ms
    [06:07:02] Starting 'buildRules'...
    [06:07:02] Starting 'buildTests'...
    [06:07:02] Starting 'buildTypescriptServicesOut'...
    [06:07:02] Starting 'buildServerLibraryOut'...
    [06:07:13] Finished 'buildRules' after 11 s
    [06:07:13] Finished 'buildTests' after 11 s
    [06:07:13] Finished 'buildTypescriptServicesOut' after 11 s
    [06:07:13] Starting 'createTypescriptServicesJs'...
    [06:07:13] Finished 'buildServerLibraryOut' after 11 s
    [06:07:13] Starting 'createServerLibraryJs'...
    [06:07:13] Finished 'createTypescriptServicesJs' after 18 ms
    [06:07:13] Starting 'createTypescriptServicesDts'...
    [06:07:13] Finished 'createServerLibraryJs' after 23 ms
    [06:07:13] Starting 'createServerLibraryDts'...
    [06:07:13] Finished 'createTypescriptServicesDts' after 15 ms
    [06:07:13] Starting 'createTypescriptJs'...
    [06:07:13] Finished 'createServerLibraryDts' after 13 ms
    [06:07:13] Finished 'createTypescriptJs' after 15 ms
    [06:07:13] Starting 'createTypescriptDts'...
    [06:07:13] Finished 'createTypescriptDts' after 4.04 ms
    [06:07:13] Starting 'createTypescriptStandaloneDts'...
    [06:07:13] Finished 'createTypescriptStandaloneDts' after 8.91 ms
    [06:07:13] Starting 'runTests'...
    [06:07:13] Running tests with config: {"test":["declarationMapsEnableMapping_NoInlineSources"],"light":true,"skipPercent":0,"noColor":fals
    eout":40000,"keepFailed":false}
    [06:07:13] > node C:\Code\typescript\node_modules\mocha\bin\_mocha -R scripts/failed-tests -O "reporter=mocha-fivemat-progress-reporter" -
    larationMapsEnableMapping_NoInlineSources" --colors -t 40000 built/local/run.js
    
        fourslash-server tests
    
    Test failure:
    fourslash-server test declarationMapsEnableMapping_NoInlineSources.ts runs correctly
      [......................................................................]
    
      0 passing (2s)
      1 failing
    
      1) fourslash-server tests
           tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts
             fourslash-server test declarationMapsEnableMapping_NoInlineSources.ts runs correctly:
         Error: At line 1, col 0: Emit output for /dist/index.js is not as expected:
    Expected:
    "use strict";
    exports.__esModule = true;
    var Foo = /** @class */ (function () {
        function Foo() {
        }
        Foo.prototype.methodName = function (propName) { return propName; };
        Foo.prototype.otherMethod = function () {
            if (Math.random() > 0.5) {
                return { x: 42 };
            }
            return { y: "yes" };
        };
        return Foo;
    }());
    exports.Foo = Foo;
    //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRl
    JdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBO0lBQUE7SUFTQSxDQUFDO0lBUEcsd0JBQVUsR0FBVixVQUFXLFFBQWtCLElBQWMsT0FBTyxRQUFRLENBQUMsQ0FBQyxDQUFD
    dELHlCQUFXLEdBQVg7UUFDSSxJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxHQUFHLEVBQUU7WUFDckIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztTQUNs
    NELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztJQUNMLFVBQUM7QUFBRCxDQUFDLEFBVEQsSUFTQztBQVRZLGtCQUFHIiwic291cmNlc0NvbnRl
    siZXhwb3J0IGNsYXNzIEZvbyB7XG4gICAgbWVtYmVyOiBzdHJpbmc7XG4gICAgbWV0aG9kTmFtZShwcm9wTmFtZTogU29tZVR5cGUpOiBTb21lVHlwZSB7IHJldHVybiBwcm9wTmFt
    xuICAgIG90aGVyTWV0aG9kKCkge1xuICAgICAgICBpZiAoTWF0aC5yYW5kb20oKSA+IDAuNSkge1xuICAgICAgICAgICAgcmV0dXJuIHt4OiA0Mn07XG4gICAgICAgIH1cbiAgICAg
    V0dXJuIHt5OiBcInllc1wifTtcbiAgICB9XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgU29tZVR5cGUge1xuICAgIG1lbWJlcjogbnVtYmVyO1xufSJdfQ==
    
    Actual:
    "use strict";
    exports.__esModule = true;
    var Foo = /** @class */ (function () {
        function Foo() {
        }
        var proto_1 = Foo.prototype;
        proto_1.methodName = function (propName) { return propName; };
        proto_1.otherMethod = function () {
            if (Math.random() > 0.5) {
                return { x: 42 };
            }
            return { y: "yes" };
        };
        return Foo;
    }());
    exports.Foo = Foo;
    //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRl
    JdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBO0lBQUE7SUFTQSxDQUFDOztJQVBHLGtCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FB
    M3RCxtQkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFO1lBQ3JCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7U0FD
    FDRCxPQUFPLEVBQUMsQ0FBQyxFQUFFLEtBQUssRUFBQyxDQUFDO0lBQ3RCLENBQUM7SUFDTCxVQUFDO0FBQUQsQ0FBQyxBQVRELElBU0M7QUFUWSxrQkFBRyIsInNvdXJjZXNDb250
    pbImV4cG9ydCBjbGFzcyBGb28ge1xuICAgIG1lbWJlcjogc3RyaW5nO1xuICAgIG1ldGhvZE5hbWUocHJvcE5hbWU6IFNvbWVUeXBlKTogU29tZVR5cGUgeyByZXR1cm4gcHJvcE5h
    1cbiAgICBvdGhlck1ldGhvZCgpIHtcbiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPiAwLjUpIHtcbiAgICAgICAgICAgIHJldHVybiB7eDogNDJ9O1xuICAgICAgICB9XG4gICAg
    JldHVybiB7eTogXCJ5ZXNcIn07XG4gICAgfVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIFNvbWVUeXBlIHtcbiAgICBtZW1iZXI6IG51bWJlcjtcbn0iXX0=
          at TestState.raiseError (src\harness\fourslash.ts:480:19)
          at TestState.verifyGetEmitOutput (src\harness\fourslash.ts:1487:26)
          at Verify.getEmitOutput (src\harness\fourslash.ts:4083:24)
          at eval (eval at runCode (src\harness\fourslash.ts:3263:23), <anonymous>:71:8)
          at runCode (src\harness\fourslash.ts:3264:13)
          at runFourSlashTestContent (src\harness\fourslash.ts:3244:9)
          at Object.runFourSlashTest (src\harness\fourslash.ts:3229:9)
          at Context.<anonymous> (src\testRunner\fourslashRunner.ts:56:39)
          at processImmediate (internal/timers.js:439:21)
    
    
    
    [06:07:20] 'runTests' errored after 7.18 s
    [06:07:20] Error: Process exited with code: 1
        at ChildProcess.<anonymous> (C:\Code\typescript\scripts\build\utils.js:54:28)
        at ChildProcess.emit (events.js:196:13)
        at ChildProcess.EventEmitter.emit (domain.js:494:23)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
    [06:07:20] 'runtests' errored after 19 s
    [06:07:22] Using gulpfile C:\Code\typescript\gulpfile.js
    [06:07:22] Starting 'baseline-accept'...
    [06:07:22] Finished 'baseline-accept' after 38 ms
    
    
    C:\Code\typescript (class-proto-caches -> origin) (typescript@3.7.0)
    λ git status
    On branch class-proto-caches
    Your branch is up to date with 'origin/class-proto-caches'.
    
    nothing to commit, working tree clean
    
    C:\Code\typescript (class-proto-caches -> origin) (typescript@3.7.0)                                                                      
    

  4. Jack-Works commented on Apr 2, 2020

    @Jack-Works
    Contributor

    It seems like tests in the fourslash-server tests can't be baseline accepted?

  5. jakebailey commented on Jul 7, 2023

    @jakebailey
    Member

    Just looking at old issues; I'm not totally sure how to test that this is 100% fixed, but having redone the build and especially now I added a CI job which checks "if I delete all baselines then re-accept them, nothing changes", I'm willing to bet that this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureIssue relates to TypeScript team infrastructure

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions