Re: nsAutoConfig
I didn't write the test, so I honestly don't know. I'll try to make time to take a look. Mike On Wed, Nov 1, 2017 at 12:04 PM, <mcastelluc...@mozilla.com> wrote: > Hey Mike, > according to our code coverage report, nsAutoConfig is never executed > during tests. > > As far as I can see, it is actually not tested, as the test you mentioned > is not setting the autoadmin.global_config_url pref that would make > nsReadConfig instantiate nsAutoConfig. Is that correct? > > I'd like to understand whether this is a problem in our coverage > collection tools that are not picking up this file for some reason or if it > actually is not tested. I've opened https://bugzilla.mozilla.org/ > show_bug.cgi?id=1413600. > > - Marco. > > On Tuesday, October 31, 2017 at 4:22:06 PM UTC+1, mka...@mozilla.com > wrote: > > On Tuesday, October 31, 2017 at 12:10:21 AM UTC-5, Nicholas Nethercote > wrote: > > > Hi, > > > > > > I was just looking at the extensions/pref/autoconfig/ directory and > trying > > > to understand what it does. > > > > > > As far as I can tell, the code is there to allow custom deployments > with > > > particular prefs set, as described at > > > https://developer.mozilla.org/en-US/Firefox/Enterprise_ > deployment#Configuration > > > > > > It's initialized by modules/libpref/Preferences.cpp if a > > > "general.config.filename" pref is found: > > > http://searchfox.org/mozilla-central/rev/ > 1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/ > Preferences.cpp#3907-3920 > > > > > > There is also some MozHarness code relating to it here: > > > http://searchfox.org/mozilla-central/source/testing/ > mozharness/mozharness/mozilla/firefox/autoconfig.py > > > > > > Just to check: is this still supported functionality? > > > > > > Thanks. > > > > > > Nick > > > > Yes, this is very much supported functionality. It is our primary means > of enterprise customization right now. > > > > The reason there are very few tests is because when it was first > developed, it wasn't possible to write tests that involved putting down > files before startup. There are some tests now: > > > > http://searchfox.org/mozilla-central/source/extensions/ > pref/autoconfig/test/unit > > > > Mike Kaply > > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: nsAutoConfig
Hey Mike, according to our code coverage report, nsAutoConfig is never executed during tests. As far as I can see, it is actually not tested, as the test you mentioned is not setting the autoadmin.global_config_url pref that would make nsReadConfig instantiate nsAutoConfig. Is that correct? I'd like to understand whether this is a problem in our coverage collection tools that are not picking up this file for some reason or if it actually is not tested. I've opened https://bugzilla.mozilla.org/show_bug.cgi?id=1413600. - Marco. On Tuesday, October 31, 2017 at 4:22:06 PM UTC+1, mka...@mozilla.com wrote: > On Tuesday, October 31, 2017 at 12:10:21 AM UTC-5, Nicholas Nethercote wrote: > > Hi, > > > > I was just looking at the extensions/pref/autoconfig/ directory and trying > > to understand what it does. > > > > As far as I can tell, the code is there to allow custom deployments with > > particular prefs set, as described at > > https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment#Configuration > > > > It's initialized by modules/libpref/Preferences.cpp if a > > "general.config.filename" pref is found: > > http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 > > > > There is also some MozHarness code relating to it here: > > http://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/firefox/autoconfig.py > > > > Just to check: is this still supported functionality? > > > > Thanks. > > > > Nick > > Yes, this is very much supported functionality. It is our primary means of > enterprise customization right now. > > The reason there are very few tests is because when it was first developed, > it wasn't possible to write tests that involved putting down files before > startup. There are some tests now: > > http://searchfox.org/mozilla-central/source/extensions/pref/autoconfig/test/unit > > Mike Kaply ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: nsAutoConfig
Thank you for the info! I will leave that code alone :) Nick On Wed, Nov 1, 2017 at 2:22 AM,wrote: > On Tuesday, October 31, 2017 at 12:10:21 AM UTC-5, Nicholas Nethercote > wrote: > > Hi, > > > > I was just looking at the extensions/pref/autoconfig/ directory and > trying > > to understand what it does. > > > > As far as I can tell, the code is there to allow custom deployments with > > particular prefs set, as described at > > https://developer.mozilla.org/en-US/Firefox/Enterprise_ > deployment#Configuration > > > > It's initialized by modules/libpref/Preferences.cpp if a > > "general.config.filename" pref is found: > > http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1 > b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 > > > > There is also some MozHarness code relating to it here: > > http://searchfox.org/mozilla-central/source/testing/ > mozharness/mozharness/mozilla/firefox/autoconfig.py > > > > Just to check: is this still supported functionality? > > > > Thanks. > > > > Nick > > Yes, this is very much supported functionality. It is our primary means of > enterprise customization right now. > > The reason there are very few tests is because when it was first > developed, it wasn't possible to write tests that involved putting down > files before startup. There are some tests now: > > http://searchfox.org/mozilla-central/source/extensions/ > pref/autoconfig/test/unit > > Mike Kaply > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: nsAutoConfig
On Tuesday, October 31, 2017 at 12:10:21 AM UTC-5, Nicholas Nethercote wrote: > Hi, > > I was just looking at the extensions/pref/autoconfig/ directory and trying > to understand what it does. > > As far as I can tell, the code is there to allow custom deployments with > particular prefs set, as described at > https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment#Configuration > > It's initialized by modules/libpref/Preferences.cpp if a > "general.config.filename" pref is found: > http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 > > There is also some MozHarness code relating to it here: > http://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/firefox/autoconfig.py > > Just to check: is this still supported functionality? > > Thanks. > > Nick Yes, this is very much supported functionality. It is our primary means of enterprise customization right now. The reason there are very few tests is because when it was first developed, it wasn't possible to write tests that involved putting down files before startup. There are some tests now: http://searchfox.org/mozilla-central/source/extensions/pref/autoconfig/test/unit Mike Kaply ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Re: nsAutoConfig
Are you sure the test you wrote is testing nsAutoConfig and not nsReadConfig? nsReadConfig does not instantiate nsAutoConfig unless autoadmin.global_config_url exists and is not emtpy: https://codecov.io/gh/marco-c/gecko-dev/src/9ca76dcb7a5c61d33750e9718c02b11ba35c1032/extensions/pref/autoconfig/src/nsReadConfig.cpp#L205 https://dxr.mozilla.org/mozilla-central/rev/1c618b1a13662de7cec429f606367db3827b6dc7/extensions/pref/autoconfig/src/nsReadConfig.cpp#208 - Marco. Il 31/10/2017 10:38, Masatoshi Kimura ha scritto: > On 2017/10/31 19:22, Marco Castelluccio wrote: >> It is not covered by any automated test: >> https://codecov.io/gh/marco-c/gecko-dev/src/9ca76dcb7a5c61d33750e9718c02b11ba35c1032/extensions/pref/autoconfig/src/nsAutoConfig.cpp >> (this doesn't mean it isn't actually used ever, but it can be a clue). > Actually I wrote an automated test, although it is difficult for > coverage tools to find the usage: > https://bugzilla.mozilla.org/show_bug.cgi?id=1267567 > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: nsAutoConfig
On 2017/10/31 19:22, Marco Castelluccio wrote: > It is not covered by any automated test: > https://codecov.io/gh/marco-c/gecko-dev/src/9ca76dcb7a5c61d33750e9718c02b11ba35c1032/extensions/pref/autoconfig/src/nsAutoConfig.cpp > (this doesn't mean it isn't actually used ever, but it can be a clue). Actually I wrote an automated test, although it is difficult for coverage tools to find the usage: https://bugzilla.mozilla.org/show_bug.cgi?id=1267567 ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: nsAutoConfig
It is not covered by any automated test: https://codecov.io/gh/marco-c/gecko-dev/src/9ca76dcb7a5c61d33750e9718c02b11ba35c1032/extensions/pref/autoconfig/src/nsAutoConfig.cpp (this doesn't mean it isn't actually used ever, but it can be a clue). - Marco. Il 31/10/2017 05:09, Nicholas Nethercote ha scritto: > Hi, > > I was just looking at the extensions/pref/autoconfig/ directory and trying > to understand what it does. > > As far as I can tell, the code is there to allow custom deployments with > particular prefs set, as described at > https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment#Configuration > > It's initialized by modules/libpref/Preferences.cpp if a > "general.config.filename" pref is found: > http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 > > There is also some MozHarness code relating to it here: > http://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/firefox/autoconfig.py > > Just to check: is this still supported functionality? > > Thanks. > > Nick > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
nsAutoConfig
Hi, I was just looking at the extensions/pref/autoconfig/ directory and trying to understand what it does. As far as I can tell, the code is there to allow custom deployments with particular prefs set, as described at https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment#Configuration It's initialized by modules/libpref/Preferences.cpp if a "general.config.filename" pref is found: http://searchfox.org/mozilla-central/rev/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/modules/libpref/Preferences.cpp#3907-3920 There is also some MozHarness code relating to it here: http://searchfox.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/firefox/autoconfig.py Just to check: is this still supported functionality? Thanks. Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform