Closed Bug 1447941 Opened 6 years ago Closed 6 years ago
Wait For Condition with Test Utils .wait For Condition in browser _about Home _search _searchbar .js
This is a good first bug for newcomers to Firefox development. promiseWaitForCondition in the browser_aboutHome_search_searchbar.js test file can be replaced by the TestUtils.waitForCondition utility function. We can also remove the function definition in the head.js file. The code in question is here: https://searchfox.org/mozilla-central/search?q=promisewaitforcondition&path=browser%2Fbase%2Fcontent%2Ftest%2Fabout For instructions on how to get your local build of Firefox up and running and submit your patch, see https://developer.mozilla.org/en-US/docs/Introduction. You can run this test with the ./mach mochitest command: ./mach mochitest browser/base/content/test/about/browser_aboutHome_search_searchbar.js Please leave a comment if you would like to be assigned to this bug and feel free to ask questions here or via IRC if you're stuck.  https://searchfox.org/mozilla-central/rev/efce4ceddfbe5fe4e2d74f1aed93894bada9b273/testing/modules/TestUtils.jsm#114
Hello I was referred to this bug. Can I tackle this problem ?
Assignee: nobody → kev.ftw595
Status: NEW → ASSIGNED
Hi, are you still working on this? :)
Assignee: kev.ftw595 → nobody
Status: ASSIGNED → NEW
Hi I'm Issei. Could I work on this issue?
Hi, Could I ask you a question? I tried the testing command and got errors. ================================== $ ./mach mochitest browser/base/content/test/about/browser_aboutHome_search_searchbar.js cat: backend.TestManifestBackend.in: No such file or directory Build configuration changed. Regenerating backend. Traceback (most recent call last): File "/Users/horie/oss/mozilla/mozilla-unified/build/gen_test_backend.py", line 39, in <module> sys.exit(gen_test_backend()) File "/Users/horie/oss/mozilla/mozilla-unified/build/gen_test_backend.py", line 35, in gen_test_backend backend.consume(data) File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/backend/base.py", line 126, in consume for obj in objs: File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/emitter.py", line 172, in emit for out in output: File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/reader.py", line 899, in read_topsrcdir for r in self.read_mozbuild(path, self.config): File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/reader.py", line 1073, in read_mozbuild sys.exc_info(), sandbox_load_error=sle) mozbuild.frontend.reader.BuildReaderError: ============================== FATAL ERROR PROCESSING MOZBUILD FILE ============================== The error occurred while processing the following file: /Users/horie/oss/mozilla-unified/moz.build The underlying problem is we referenced a path that does not exist. That path is: /Users/horie/oss/mozilla-unified/moz.build Either create the file if it needs to exist or do not reference it. make: *** [backend.TestManifestBackend] Error 1 Error running mach: ['mochitest', 'browser/base/content/test/about/browser_aboutHome_search_searchbar.js'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You should consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: Exception: Process executed with non-0 exit code 2: [u'/usr/bin/make', u'-f', u'/Users/horie/oss/mozilla/mozilla-unified/build/rebuild-backend.mk', u'-j8', u'-s', u'backend.TestManifestBackend'] File "/Users/horie/oss/mozilla/mozilla-unified/testing/mochitest/mach_commands.py", line 353, in run_mochitest_general tests = mochitest.resolve_tests(test_paths, test_objects, cwd=self._mach_context.cwd) File "/Users/horie/oss/mozilla/mozilla-unified/testing/mochitest/mach_commands.py", line 104, in resolve_tests resolver = self._spawn(TestResolver) File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/base.py", line 741, in _spawn topobjdir=self.topobjdir) File "/Users/horie/oss/mozilla/mozilla-unified/testing/mozbase/moztest/moztest/resolve.py", line 401, in __init__ self.topsrcdir, 'build', 'gen_test_backend.py'), File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/base.py", line 669, in _run_make return fn(**params) File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/base.py", line 724, in _run_command_in_objdir return self.run_process(cwd=self.topobjdir, **args) File "/Users/horie/oss/mozilla/mozilla-unified/python/mach/mach/mixin/process.py", line 153, in run_process raise Exception('Process executed with non-0 exit code %d: %s' % (status, args)) ============================= Is there any instruction I missed?
Sorry for the delay here, last week was pretty busy for me. Hm, did you run ./mach bootstrap and ./mach build ? You can find more detailed build instructions here: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build Please make sure to follow them :)
Assignee: nobody → is2ei.horie
Status: NEW → ASSIGNED
Flags: needinfo?(jhofmann) → needinfo?(is2ei.horie)
(In reply to Johann Hofmann [:johannh] - back on May 2nd from comment #6) > Sorry for the delay here, last week was pretty busy for me. > > Hm, did you run > > ./mach bootstrap > > and > > ./mach build > > ? > > You can find more detailed build instructions here: > https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/ > Build_Instructions/Simple_Firefox_build > > Please make sure to follow them :) Thanks! I tried to build and got an error... https://pastebin.mozilla.org/9084208 I'm asking how to solve it on #build and #introduction channels. Could you help me if you found that kind of error before?
Flags: needinfo?(is2ei.horie) → needinfo?(jhofmann)
The error has gone now. I'll continue to work on this issue.
Thanks for your support! I created a patch. Could you review it, please?
Attachment #8972198 - Flags: review?(jhofmann)
Comment on attachment 8972198 [details] [diff] [review] bug-1447941.patch Review of attachment 8972198 [details] [diff] [review]: ----------------------------------------------------------------- That looks great, thank you! I've given you the ability edit bugs now, so you can just set the checkin-needed flag on this one if you like to get it landed (in the "keywords" field). We would usually do a try run (https://wiki.mozilla.org/ReleaseEngineering/TryServer) but I assume you ran the test locally so we don't have to waste precious energy on it :) Thanks!
Attachment #8972198 - Flags: review?(jhofmann) → review+
Thanks! I have marked this for checkin.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/ba57284bc3bc Replace promiseWaitForCondition with TestUtils.waitForCondition in browser_aboutHome_search_searchbar.js r=johannh
You need to log in before you can comment on or make changes to this bug.