Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin 267486a4e5 Bug 1495062 - [mozversion-rust] Release 0.2.0. r=ato
Depends on D17679

Differential Revision: https://phabricator.services.mozilla.com/D17680

--HG--
extra : moz-landing-system : lando
2019-01-28 15:22:37 +00:00
Henrik Skupin 927eabeb98 Bug 1495062 - [mozrunner-rust] Release 0.9.0. r=ato
Depends on D17678

Differential Revision: https://phabricator.services.mozilla.com/D17679

--HG--
extra : moz-landing-system : lando
2019-01-28 15:22:44 +00:00
Henrik Skupin 32ca2a0c03 Bug 1495062 - [mozprofile-rust] Release 0.5.0. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D17678

--HG--
extra : moz-landing-system : lando
2019-01-28 15:22:56 +00:00
Henrik Skupin 5c33925458 Bug 1508670 - [mozrunner] Fix Rust code to be compatible with Rust 2018 edition. r=ato
Depends on D13397

Differential Revision: https://phabricator.services.mozilla.com/D13398

--HG--
extra : moz-landing-system : lando
2018-11-29 20:44:15 +00:00
Henrik Skupin 1a682c6e7c Bug 1508670 - [mozversion] Fix Rust code to be compatible with Rust 2018 edition. r=ato
Depends on D13396

Differential Revision: https://phabricator.services.mozilla.com/D13397

--HG--
extra : moz-landing-system : lando
2018-11-29 20:43:52 +00:00
Henrik Skupin 4daa7928cd Bug 1508670 - [mozprofile] Fix Rust code to be compatible with Rust 2018 edition. r=ato
Depends on D13395

Differential Revision: https://phabricator.services.mozilla.com/D13396

--HG--
extra : moz-landing-system : lando
2018-11-29 20:43:30 +00:00
Alex Gaynor 8c784a6c6d Bug 1498247 - Part 3 - switch from using the deprecated env::home_dir() to the dirs crate; r=jgraham
Depends on D8578

Differential Revision: https://phabricator.services.mozilla.com/D8579

--HG--
extra : moz-landing-system : lando
2018-10-12 17:26:21 +00:00
Alex Gaynor b796049372 Bug 1498247 - Part 1 - Add a dependency on dirs for getting the home directory; r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D8577

--HG--
extra : moz-landing-system : lando
2018-10-12 17:24:43 +00:00
Andreas Tolfsen 4b95006f04 bug 1494613: mozprofile: add docs for Pref::new and ::new_sticky r=whimboo 2018-09-29 15:45:30 +01:00
Andreas Tolfsen 3d48e987b5 bug 1466818: mozrunner: release 0.8.0; r=me 2018-09-16 00:32:18 +01:00
Andreas Tolfsen a90e90dac3 no bug: mozprofile: release 0.4.0; r=me 2018-09-16 00:24:46 +01:00
Andreas Tolfsen c67e2dd198 Bug 1488006: mozprofile: derive Default for prefreader::Position. r=jgraham
The user might expect to be able to use Default as the type can be
constructed without arguments.
2018-09-04 14:29:01 +01:00
Andreas Tolfsen ea994573f0 Bug 1488006: mozprofile: avoid incidental functional call; r=jgraham
There is a functional call after ok_or() which is called and
evaluated before escape_char is converted due to RHS evaluation.
We can avoid this by employing a closure with ok_or_else().
2018-09-04 14:29:01 +01:00
Andreas Tolfsen 5f5116a9ec Bug 1488006: mozprofile: deref token to avoid & prefix; r=jgraham
It is considered more idiomatic to dereference the match expression
than to peek at each variant through a reference.

This silences a clippy lint warning.
2018-09-04 14:29:00 +01:00
Andreas Tolfsen 3a22b09028 Bug 1488006: mozprofile: turn single-character strings into chars; r=jgraham
Where we have single-character strings we can convert them to chars
for efficiency.
2018-09-04 14:28:59 +01:00
Andreas Tolfsen cc5b563e28 Bug 1488006: mozprofile: avoid identical conversions; r=jgraham
PrefReaderError::new already expects a &str.
2018-09-04 14:28:58 +01:00
Andreas Tolfsen 5c6ca540e3 Bug 1488006: mozprofile: loop over references to container; r=jgraham
It is considered more idiomatic Rust to loop over references to
containers rather than calling the iteration protocol's x.iter()
or x.into_iter() explicitly.
2018-09-04 14:28:58 +01:00
Andreas Tolfsen 129ea5a2a5 Bug 1488006: mozprofile: replace call to io::Write::write() with ::write_all(); r=jgraham
io::Write::write() is not guaranteed to process the entire buffer.
It returns how many bytes were processed, which may be smaller than the
given buffer's length.  mozprofile does not need to deal with partial
writes, so all the calls to ::write() may be replaced with ::write_all().
2018-09-04 14:28:57 +01:00
Andreas Tolfsen 70d1acfb74 Bug 1488006: mozprofile: prefer byte string literals to as_bytes() where possible; r=jgraham
Where string literals contain only ASCII characters, it is considered
better style to define byte strings using b"foo" rather than calling
"foo".as_bytes().
2018-09-04 14:28:56 +01:00
Andreas Tolfsen da30cf1fa1 Bug 1488006: mozprofile: drop needless lifetimes; r=jgraham
Drops all the unnecessary lifetime definitions in mozprofile.
2018-09-04 14:28:56 +01:00
Andreas Tolfsen 4cf5f38cc9 Bug 1488006: mozprofile: avoid redundant field names in struct init; r=jgraham 2018-09-04 14:28:55 +01:00
Andreas Tolfsen 6064b9610a Bug 1488006: mozprofile: format code; r=jgraham
No functional changes, apart from running all the code through
rustfmt prior to fixing clippy lint warnings.
2018-09-04 14:28:55 +01:00
Andreas Tolfsen 397e3d27d5 Bug 1488007: mozversion: format; r=jgraham
No functional changes, except applying rustfmt.
2018-09-04 13:46:38 +01:00
Andreas Tolfsen 7b7c50ebb6 Bug 1488007: mozversion: lint; r=jgraham
Address clippy lint warnings in mozversion.
2018-09-04 13:46:38 +01:00
ui.manish a5ea6dfab9 Bug 1435552 Remove NO_EM_RESTART from test harnesses; r=gbrown 2018-08-31 15:33:32 +02:00
Andreas Tolfsen 8f5737840d Bug 1483288 - Provide more number conversions for mozprofile::preferences::PrefValue. r=whimboo
Allow i8, u8, i16, u64, i32, and u32 to be implicitly converted into
PrefValue::Int.  u64 is not supported because it would overflow,
so this still needs to be handled manually.

geckodriver stores the port number as u8 and this will allow it to
implicitly convert it to PrefValue::Int without using the unsafe
"as i64" coercion.
2018-08-15 15:49:09 +01:00
James Graham 38b6d8b9c7 Bug 1482238 - Bump version of regex in mozversion, r=froydnj
MozReview-Commit-ID: 4VxqemrFWf0

Differential Revision: https://phabricator.services.mozilla.com/D3122

--HG--
extra : moz-landing-system : lando
2018-08-10 20:43:53 +00:00
Andreas Tolfsen 26a47a902a Bug 1441204 - Release mozrunner 0.7.0. r=maja_zf
MozReview-Commit-ID: HszLaFJv2w5

--HG--
extra : rebase_source : d3b32046bb8c6c5db4c578a84ee91ab270e2efbc
2018-06-14 13:26:59 -07:00
Andreas Tolfsen 14a4db48fa Bug 1441204 - Upgrade rust-ini from 0.10.2 to 0.10.3. r=maja_zf
MozReview-Commit-ID: DZp1wg7uVLN

--HG--
extra : rebase_source : 6e90df2a83accff53d021303e9bafc46aa1afe98
2018-06-14 13:05:30 -07:00
Andreas Tolfsen 3239875a26 Bug 1466573 - Start Firefox with -foreground and -no-remote. r=jgraham
Start Firefox with -foreground and -no-remote arguments if they
have not already been given by the user.

-foreground will ensure the application window gets focus when
Firefox is started, and -no-remote will prevent remote commands to
this instance of Firefox and also ensure we always start a new instance.

MozReview-Commit-ID: LGEqgyHYapc

--HG--
extra : rebase_source : 50054e89106421dc6b43bc1f109dc75db37dfd2d
2018-06-05 18:02:34 +01:00
Andreas Tolfsen 93b417ca3d Bug 1466573 - Avoid resetting stdout + stderr. r=jgraham
The std::process::Command's stdout and stderr is configured earlier in
::start(), and resetting it to a static value below would invalidate the
configured stdout and stderr stored in FirefoxRunner::stdout and ::stderr.

We did not notice this bug because geckodriver does not
yet use this feature.  It was added as a precursor for
https://bugzilla.mozilla.org/show_bug.cgi?id=1466573.

MozReview-Commit-ID: CmwqCZpEMqq

--HG--
extra : rebase_source : 209d7cdde8b05db9b7e6f02b221c32a436f2ecdf
2018-06-05 15:08:52 +01:00
Andreas Tolfsen 9dbf303c69 Bug 1466573 - Write profile prefs before constructing command. r=whimboo
MozReview-Commit-ID: 5XWglxjQvZh

--HG--
extra : rebase_source : 98f68088fe81746e7e878c1fa6b8fea3fb3dd150
2018-06-05 15:08:07 +01:00
Andreas Tolfsen 16e1247e4d Bug 1467728 - Fix mozrunner build on macOS. r=whimboo
Bug 1464995 broke mozrunner on macOS, but we did not notice because
geckodriver is not compiled on macOS.  This fixes the build.

MozReview-Commit-ID: GnvZTT30wHG

--HG--
extra : rebase_source : 6e5b5b37d0c962c75a2a4b41c004f9cf47c2e8a2
2018-06-08 14:24:58 +01:00
Andreas Tolfsen 16b85ecaa0 Bug 1464995 - Ensure found Firefox is an executable binary. r=jgraham,whimboo
mozrunner fails to locate the correct binary if Firefox is found
under a "firefox" or "firefox-bin" (depending on the system)
because it thinks the parent directory is the executable.

On Unix systems, mozrunner also falsely reports non-executable
files as valid binaries.

This patch introduces a new mozrunner::path module that provides
two functions: one for searching the system path for a binary by a
given name, and another for checking whether a path is an executable
binary file.

MozReview-Commit-ID: 6N06CXZZWqd

--HG--
extra : rebase_source : dbcb4d6d8478bafc23c1aa2a3081589074908bbc
2018-05-29 17:10:26 +01:00
Andreas Tolfsen eb6512097e Bug 1464995 - Minor readability lints. r=whimboo
Removes an unnecessary as_ref() cast, a path coercion, and replaces
try!() with ?.

MozReview-Commit-ID: ASd9kNxDZ3n

--HG--
extra : rebase_source : fa88def64fc3c7ea4520403bfc7b5c391d7f83da
2018-05-29 17:10:07 +01:00
Andreas Tolfsen 50aa8dc506 Bug 1464995 - Document mozrunner::firefox_default_path(). r=whimboo
The method we use to find the Firefox binary varies from platform
to platform.  It can be useful to document how each of the system
specific implementations are meant to work.

MozReview-Commit-ID: 4SrNmlp3AdS

--HG--
extra : rebase_source : f1d54548edb416912af3a0a6d41188d0640a3ffb
2018-05-29 17:08:14 +01:00
Andreas Tolfsen 95f8f2a563 Bug 1461101 - Remove unused .gitignore file. r=whimboo
Following the move to use cargo worktrees in central, the .gitignore
file for mozversion is not used anymore since we no longer generate
testing/mozbase/rust/mozversion/target on building.

MozReview-Commit-ID: 72geBjNxjZl

--HG--
extra : rebase_source : d7f11b33c91407e97416344ca1a2d0f06aa573d3
2018-05-12 14:08:07 +01:00
Andreas Tolfsen 2efb6af857 Bug 1448900 - Release mozrunner 0.6.1. r=whimboo
One change since 0.6.0, which is a regression fix for a fallout
from bug 1443853.

MozReview-Commit-ID: 56GbEV4HM4v

--HG--
extra : rebase_source : 0e14fa63f00f1661cae01a10c76c2813d349ba1b
2018-03-28 17:28:29 +01:00
Andreas Tolfsen 73c11c00a8 Bug 1448900 - Avoid killing exited process. r=jgraham,whimboo
std::process::Child::kill() will return Err if the process has
already exited.  The assumption in bug 1443853 was that calling
::kill() would consistently return the std::process::ExitStatus
was the process already dead.

This patches the regression from bug 1443853 by employing
Child::try_wait() in a loop.  When the process gives some exit status,
this is return directly without relying on Child::kill() as before.

If the process has not exited and the timeout has elapsed, we kill
the process and return its return value.  If the process has not
exited but the timeout duration has not elapsed, we wait 100 ms as before.

MozReview-Commit-ID: 4VENbrKtcEh

--HG--
extra : rebase_source : 7f27ed057da740306367ef2b6a87f8ac6a242541
2018-03-28 17:17:29 +01:00
Andreas Tolfsen 6b09cf8df1 Bug 1401129 - Release mozrunner 0.6.0. r=whimboo
MozReview-Commit-ID: 2nljPi3HN5b

--HG--
extra : rebase_source : 7e1cd2201937b5bb47fe81bcdbd6c1bc068b92b5
2018-03-08 14:26:10 +00:00
Andreas Tolfsen 7b875989b2 Bug 1401129 - Release mozversion 0.1.3. r=whimboo
MozReview-Commit-ID: JMUOjttq31L

--HG--
extra : rebase_source : 188ea63b2a3aff99562df94bb7c4a9e164cfea54
2018-03-12 11:48:18 +00:00
Andreas Tolfsen 98cdaaee72 Bug 1443853 - Move browser process shutdown monitor to mozrunner. r=jgraham
This moves the shutdown monitor for the Firefox process from
geckodriver to mozrunner, which is a more suitable home for it.
We will likely need specialised versions of this in the future with
products such as GeckoView and Fennec.

In addition to the move it also cleans up the polling loop by
employing std::time::SystemTime which lets us match on the elapsed
time since its construction.  This seems nicer than having to perform
division operations on integers, which in Rust are inherently unsafe
(there is no guard against SIGFPE).

This change should be functionally equivalent to the existing code.

MozReview-Commit-ID: 1asnFbixhcY

--HG--
extra : rebase_source : f21f734862bfbbc1ed665dc9c9f611c5968d662f
2018-03-07 21:57:53 +00:00
Andreas Tolfsen 1509c2ba22 Bug 1443853 - Rename RunnerProcess::status() to ::try_wait(). r=jgraham
This renames RunnerProcess::status() to ::try_wait() for symmetry
with std::process::Child::try_wait() in the standard library.

The patch also makes an attempt at cleaning up its usage in geckodriver,
however this can be further improved.

MozReview-Commit-ID: 14ihT7MpM7l

--HG--
extra : rebase_source : 4e96c79c6ebbb256c4a08cb4dd86c99aacaa13ac
2018-03-07 21:43:49 +00:00
Andreas Tolfsen f57be4355e Bug 1443853 - Avoid std::io::{Result,Error} renaming. r=jgraham
We can pick up std::io::Result and std::io::Error directly from
the std::io namespace without having to rename them.

MozReview-Commit-ID: 9Xz92HvcFpO

--HG--
extra : rebase_source : 89a006c40e11d9e7fc5706d3a6612f916e00f919
2018-03-07 21:31:31 +00:00
Andreas Tolfsen a1615d76ac Bug 1443853 - Rename RunnerProcess::stop() to ::kill(). r=jgraham
This renames RunnerProcess::stop() to ::kill() for symmetry with
the standard library's std::process::Child.

MozReview-Commit-ID: 20vSni9bA0X

--HG--
extra : rebase_source : 112b29249563154b50d9a72c141034e5cdf7f19b
2018-03-07 21:29:23 +00:00
Andreas Tolfsen ecbbc100b2 Bug 1443853 - Rename RunnerProcess::is_running() to ::running(). r=jgraham
The ideom for getters in Rust is to not prefix them with "is_".
Setters should, however, have the "set_" prefix.

MozReview-Commit-ID: 9kXHBYGK7aL

--HG--
extra : rebase_source : 6c2591771646c8b7c5b0e6b1af5427455938b4cf
2018-03-07 21:23:57 +00:00
Andreas Tolfsen 8e428fe6bb Bug 1443853 - Drop unused std::ascii::AsciiExt trait. r=jgraham
Silences another compiler warning.

MozReview-Commit-ID: 6Bcw7Ej9uIC

--HG--
extra : rebase_source : 4f6d8522434fed7e673b71d028dce53753f4a3e5
2018-03-07 21:27:18 +00:00
Andreas Tolfsen 86adc06b32 Bug 1439331 - Upgrade mozrunner log dependency to 0.4. r=jgraham
MozReview-Commit-ID: 96rHwvsIEik

--HG--
extra : rebase_source : 8dc84880d8b1f9cba778c55dabb1cfd2cd31257f
2018-02-19 12:46:53 +01:00
Andreea Pavel 74b7ffee40 Merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : js/src/jscompartment.cpp => js/src/vm/JSCompartment.cpp
rename : js/src/jscompartment.h => js/src/vm/JSCompartment.h
rename : js/src/jsscript.cpp => js/src/vm/JSScript.cpp
rename : js/src/jsscript.h => js/src/vm/JSScript.h
extra : amend_source : 9c233cb959c45e401189d089a094f9d141d2b912
2018-02-15 12:24:21 +02:00
Andreas Tolfsen 14bddc03aa Bug 1437571 - Upgrade to winreg v0.5.0. r=jgraham
Output from "./mach vendor rust":

    Removing advapi32-sys v0.1.2
    Removing kernel32-sys v0.1.4
    Removing ktmw32-sys v0.1.0
      Adding winapi v0.3.4
      Adding winapi-i686-pc-windows-gnu v0.4.0
      Adding winapi-x86_64-pc-windows-gnu v0.4.0
    Updating winreg v0.3.5 -> v0.5.0

MozReview-Commit-ID: 5IP63yfo34S
2018-02-14 20:48:17 +00:00