Commit Graph
86 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 5f8196cca6 Ignore .bash_history from Docker 2015-10-06 15:09:44 -07:00
Andrew Schwartzmeyer b9e313a3ba Use bash, not sh 2015-10-02 12:08:12 -07:00
Andrew Schwartzmeyer 374e8a9f17 Merge branch 'develop' into dev/263-set-variable 2015-10-02 11:56:34 -07:00
Andrew Schwartzmeyer 781a2dad79 Merge branch 'develop' into dev/115-get-psdrive 2015-10-01 22:03:14 -07:00
Andrew Schwartzmeyer bf5909f26c Merge branch 'develop' into dev/188-get-content-add-tests 2015-10-01 20:30:54 -07:00
Andrew Schwartzmeyer 7d44959188 Merge branch 'develop' into dev/240-getrandom 2015-10-01 20:18:52 -07:00
Andrew Schwartzmeyer e31b3b5f3b Merge branch 'develop' into dev/208-select-string-pester 2015-10-01 15:34:08 -07:00
Andy Schwartzmeyer 48efe36603 Merge pull request 162 from repin into develop 2015-10-01 20:13:47 +00:00
Andrew Schwartzmeyer e9a1b5aaf0 Repin monad-native with updated gitignore 2015-10-01 13:05:33 -07:00
Andrew Schwartzmeyer 0e744caaa1 Repin monad-ext with System.Console patch 2015-10-01 13:04:58 -07:00
Andrew Schwartzmeyer c40bae356a Repin monad to 2015-10-01 2015-10-01 11:45:49 -07:00
Andrew Schwartzmeyer c8c05b23fb Run sudo with --set-home 2015-10-01 10:36:23 -07:00
Andrew Schwartzmeyer 86ebb7efb8 Ignore NuGet folders 2015-10-01 10:18:10 -07:00
Andrew Schwartzmeyer be7932155a Make impersonation switchable
Useful when debugging issues with root vs non-root
2015-10-01 10:18:10 -07:00
Andrew Schwartzmeyer 3ea6e96663 Run as local user inside Docker container 2015-10-01 10:18:10 -07:00
Andrew Schwartzmeyer d0e93b6b7f Refactor build.sh
- build.sh runs non-interactively
- build-tty.sh runs interactively with a pseudo tty
- both are shims to build-run.sh
- monad-native no longer depends on a tty
2015-10-01 10:18:10 -07:00
Andrew Schwartzmeyer b14a455343 Create TypeCatalogGen.exe input, powershell.inc
Previous attempt at this failed because it is not actually a Makefile.
2015-09-30 18:41:02 -07:00
Andy Schwartzmeyer 503dec41dc Merge pull request 151 from dev/248-cleanup into develop 2015-09-21 18:21:01 +00:00
Andrew Schwartzmeyer 88aefa5f40 Refactor to use $(APP_BASE)
Now that everything is run from exec_env/app_base, we can reuse it and
remove TESTRUN_FOLDER.
2015-09-21 11:20:30 -07:00
Andrew Schwartzmeyer 77b5569385 Fix rm 2015-09-18 14:18:05 -07:00
Andrew Schwartzmeyer bb4739db78 Refactor NuGet install step 2015-09-18 13:19:45 -07:00
Andrew Schwartzmeyer 050206ff8a Delete xunittests.xml on make clean 2015-09-18 12:59:59 -07:00
Andrew Schwartzmeyer 94f3fef288 Remove unneeded strings folders 2015-09-18 12:59:59 -07:00
Andrew Schwartzmeyer c6ca50c618 Remove src/linux
It was a deprecated experiment
2015-09-18 12:59:59 -07:00
Andrew Schwartzmeyer 8145ea26a4 Refactor Makefile
- Update variable names
- Remove no longer used variables
- Include coreref and tests directly (now that they're short)
2015-09-18 12:59:59 -07:00
Andy Schwartzmeyer 78ca62d573 Merge pull request 150 from dev/242-noinlining into develop 2015-09-18 19:06:17 +00:00
Andrew Schwartzmeyer 234f03fd69 Repin monad with removal of NoInlining attributes
Switching to Roslyn from Mono in PR 17 made this possible.
2015-09-18 12:04:56 -07:00
Andy Schwartzmeyer 4acc7c0e60 Merge pull request 149 from dev/updates into develop 2015-09-15 23:47:53 +00:00
Andrew Schwartzmeyer c2787fdaca Repin monad and build mapping
Monad submodule has been squashed and rebased to new PowerShell branch,
th2_srv1_mgmt_dev. Build system has been updated to include upstream
changes, as well as the addition of CorePsPlatform.cs to the PowerShell
build system (so it longer needs to be added automatically).
2015-09-15 16:46:06 -07:00
Andrew Schwartzmeyer e5e9e30347 Ignore CS170{1,2} C# compiler warnings 2015-09-15 16:45:31 -07:00
Andy Schwartzmeyer 323d6798e7 Merge pull request 144 from dev/repin-monad into develop 2015-09-04 23:04:26 +00:00
Andrew Schwartzmeyer 4dc037cc4e Repin monad to latest fixes
Resolves all approved work items prior to resubmission of a code review
to the PowerShell team.
2015-09-04 16:04:11 -07:00
Andrew Schwartzmeyer 70914a35ac Merge branch 'develop' into dev/repin-monad 2015-09-04 15:19:10 -07:00
Andrew Schwartzmeyer 962e3671b1 Update xUnit tests for AMSI and repin monad
Includes lots of fixes to monad.
2015-09-03 16:04:12 -07:00
Andy Schwartzmeyer c071f5882c Merge pull request 143 from dev/228-braces into develop 2015-09-03 22:23:26 +00:00
Andrew Schwartzmeyer f70f004238 Missed a pair 2015-09-03 15:23:16 -07:00
Andrew Schwartzmeyer f163808eac Swap {} for () in Makefile
Parentheses are more portable. There was an inconsistent mix of
parentheses and curly braces.
2015-09-03 14:55:21 -07:00
Andy Schwartzmeyer 54b2435811 Merge pull request 142 from dev/199-security into develop 2015-09-03 21:34:59 +00:00
Andrew Schwartzmeyer 562a9bb35b Add Security.dll reference for Commands.Management.dll
While enabling previously disabled code in `cimConverter.cs`, it was
revealed that `Microsoft.PowerShell.Commands.Management.dll` has a
dependency on `Microsoft.PowerShell.Security.dll` for the type
`SecurityDescriptorCommandsBase`.
2015-09-03 14:31:46 -07:00
Andy Schwartzmeyer 0c5c4e8633 Merge pull request 139 from dev/226-auto-coreref into develop 2015-09-03 18:11:58 +00:00
Andrew Schwartzmeyer 94be33afe1 Generate $COREREF in Makefile automatically
Previously generated by hand and saved. Now will update itself
automatically when monad-ext/coreclr is updated.
2015-09-03 11:10:49 -07:00
Andrew Schwartzmeyer 74f0a893c1 Repin monad 2015-09-02 15:17:35 -07:00
Andy Schwartzmeyer c09796bb0a Merge pull request 135 from dev/209-make-script into develop 2015-09-01 21:13:48 +00:00
Andrew Schwartzmeyer 8c80840d69 Make path relative to monad-linux/scripts
Since that's where the Makefile lives
2015-09-01 14:08:04 -07:00
Andrew Schwartzmeyer a7010cd742 Add make script.ps1 target for easy testing
Use like `make src/pester-tests/Test-Split-Path.Tests.ps1`
2015-09-01 13:55:54 -07:00
Andy Schwartzmeyer d7cc3e3d64 Merge pull request 134 from dev/tests into develop 2015-08-31 19:56:37 +00:00
Andrew Schwartzmeyer 70466f963c Repin monad and monad-native
- GetCpInfo fixes monad-native compiler warning
- monad has more fixes
2015-08-31 12:55:43 -07:00
Andrew Schwartzmeyer f648656cc1 Refactor test targets 2015-08-28 21:18:58 -07:00
Andrew Schwartzmeyer 92cd86d3f2 Ignore Remove-Item errors in Split-Path setup 2015-08-28 20:13:10 -07:00
Andrew Schwartzmeyer 7b1280eb2e Refactor Split-Path regexp test
Fix issues with ordering etc.
2015-08-28 17:40:15 -07:00
Andrew Schwartzmeyer 5bdae5f77e Merge branch 'develop' into dev/112-split-path-pester 2015-08-28 17:39:08 -07:00
Andy Schwartzmeyer 60a1772a43 Merge pull request 133 from dev/164-GetComputerName-cherry into develop 2015-08-28 21:47:39 +00:00
Andrew Schwartzmeyer 6a88fe52aa Fix GetComputerName xUnit test and repin monad 2015-08-28 14:45:56 -07:00
Andy Schwartzmeyer e68785ea26 Merge pull request 132 from dev/193-repin-monad into develop 2015-08-28 17:15:23 +00:00
Andrew Schwartzmeyer 913b5a97d0 Pin src/monad to develop-2015-08-28
Build files updated. Patches squashed and rebased.
2015-08-28 10:12:27 -07:00
Andrew Schwartzmeyer 1a3d4aa9a6 Refactor host usage
Build scripts and powershell-simple.cs were refactored to work with the
patch to CoreCLR and updated hosting code.

- Paths in Makefile were fixed because the hosting code runs the
  assembly from the current working directory (usually app_base)
- runps scripts were all fixed because the hosting code CLI changed
- powershell-simple.cs was cleaned up because its Main function is now
  directly executed
- monad submodule was repinned while we had the change
- monad-ext submodule was updated with rebuild CoreCLR binaries
- monad-native submodule was repinned to development, including fixed
  test and hosting code changes
2015-08-21 17:43:46 -07:00
Andrew Schwartzmeyer 40ba6c214e Fix GetUserName unit test
A deadlock was occurring when executing `whoami` through
System.Diagnostics.Process because we were calling `WaitForExit()`
before `StandardOutput.ReadToEnd()`. According to the documentation, "To
avoid deadlocks, always read the output stream first and then wait,"
which is what we do here now.

Additionally, `Process` implements IDisposable, and is now automatically
disposed via the `using` block.

https://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/System.Diagnostics.Process(v=vs.110).aspx
2015-08-13 15:45:13 -07:00
Andrew Schwartzmeyer 864e32f331 Merge branch 'develop' into dev/fix-nuget 2015-08-11 08:59:28 -07:00
Andrew Schwartzmeyer c9e1b6cbb1 Use NuGet APIv3 2015-08-11 08:56:29 -07:00
Andrew Schwartzmeyer 8d34bbea0a Repin monad and monad-native 2015-08-10 13:37:17 -07:00
Andrew Schwartzmeyer 095ef2c385 Assert GetUserName unit test against whoami 2015-08-07 16:56:19 -07:00
Andrew Schwartzmeyer b1ef23d707 Merge branch 'develop' into dev/67-GetUserName 2015-08-07 16:00:59 -07:00
Andrew Schwartzmeyer d35e13afdb Fix list of props test and merge cruft 2015-08-07 14:39:17 -07:00
Andrew Schwartzmeyer f4e84a84bd Refactor and add tests 2015-08-07 14:07:03 -07:00
Andrew Schwartzmeyer e5ca617d2a Repin monad and monad-native 2015-08-07 13:11:21 -07:00
Andrew Schwartzmeyer ad91eb52c3 Add source flag to nuget.exe install
`-Source 'https://nuget.org/api/v2'`

Works around NuGet 3 issues. Necessary with the MonoProject's
mono-devel (which is used in the Docker build container).
2015-08-05 16:45:19 -07:00
Andrew Schwartzmeyer adc5cd7459 Update Docker build script to use fakelogin
fakelogin populates /var/run/utmp enough such that getlogin() works, and
is included in the latest Docker image.

Run `docker pull andschwa/magrathea` to update.
2015-08-05 15:35:20 -07:00
Andrew Schwartzmeyer 1d18a810ab Update pinned monad-native 2015-08-04 18:38:04 -07:00
Andrew Schwartzmeyer 2a6305ca11 Add passing GetUserName unit test
Updates monad-native submodule to include GetUserName P/Invoke, and
updates monad submodule to use said P/Invoke.

Matches the username against ^[a-z][a-z0-9\-]*$
2015-08-04 14:48:12 -07:00
Andy Schwartzmeyer 6ae275283f Merge pull request 85 from dev/34-xUnit-XML into develop 2015-07-21 22:02:42 +00:00
Andy Schwartzmeyer d9b26ccc72 Merge pull request 83 from dev/113-reenable-pester into develop 2015-07-21 21:24:47 +00:00
Andrew Schwartzmeyer b020c4b41f Enable xUnit unit test coverage results in XML 2015-07-21 11:18:15 -07:00
Andrew Schwartzmeyer 5a596e8029 Run pester-tests also on make test
Fixes #113
2015-07-21 09:10:09 -07:00
Andy Schwartzmeyer c7e5834a17 Merge pull request 80 from dev/use-latest-tag into develop 2015-07-20 23:10:37 +00:00
Andrew Schwartzmeyer a36cb6fd05 Use andschwa/magrathea:latest to update container
Plus some readme tweaks.
2015-07-20 16:07:56 -07:00
Andrew Schwartzmeyer 694320b656 Unit tests use xUnit runner and [Fact] declaration
- Workaround test executable is now completely removed
- make test also depends on $(RUN_TARGETS)
2015-07-20 15:31:03 -07:00
Andrew Schwartzmeyer b055743728 Makefile target test uses the xUnit runner
Instead of the prior work-around.

Makefile target `internal-prepare-exec-env` was modified to create
`exec_env/testrun` and depend on `dotnetlibs/corerun` (on which it
already depended).
2015-07-20 15:24:56 -07:00
Andrew Schwartzmeyer d65db0550c Add note on recursive init submodule update 2015-07-14 15:07:43 -07:00
Andrew Schwartzmeyer d914d92780 Add Security module Makefile target
Also updated dependencies to build it
2015-07-09 16:03:50 -07:00
Andrew Schwartzmeyer ac5f89e25f Add Security module build files from Windows 2015-07-09 16:03:47 -07:00
Andrew Schwartzmeyer 3339d54e14 Use correct filenames from Windows 2015-07-09 16:02:15 -07:00
Andrew Schwartzmeyer 6790a56eed Fix COMMAND_UTILTITY typo 2015-07-09 16:01:03 -07:00
Andy Schwartzmeyer 8e8b5d14d1 Merge pull request 52 from dev/docker-build into develop 2015-07-06 21:41:58 +00:00
Andrew Schwartzmeyer b2e3a1e2e3 Add unit test for HasRegistrySupport()
The use of the function in RegistryProvider cannot be tested without a
mock of a PowerShell cmdlet context.
2015-07-06 12:46:38 -07:00
Andrew Schwartzmeyer 3919ec8375 Add unit test for PSEnumerableBinder.IsComObject() 2015-07-06 12:46:18 -07:00
Andrew Schwartzmeyer 0a13d8d21d Update readme for Docker build environment 2015-07-06 11:56:29 -07:00