Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Make the tests possible #1

Closed
farcaller opened this issue Apr 24, 2014 · 5 comments
Closed

Make the tests possible #1

farcaller opened this issue Apr 24, 2014 · 5 comments

Comments

@farcaller
Copy link
Member

All ioreg access is wrapped in VolatileCell, so it should be simple to provide ioreg mocks in tests. It's however not possible to build zinc with --test, as rust-core conflicts with std.

A way to fix that is to drop rust-core and use bare minimum from libstd, so that native builds without no_std are possible.

@bharrisau
Copy link
Contributor

Can wait for rust-lang/rfcs#40 to get implemented. Otherwise I've managed to build on my rust/cortex project using the normal libstd (it is a little clunky building libstd, need to do things like ar cr libbacktrack.a and remove the crate_type for dylib).

@bharrisau
Copy link
Contributor

@farcaller
Copy link
Member Author

I see you also got libcompiler-rt, libmorestack and liblibc in. I figured out that removing all those deps would be untrivial and hard to maintain. I might actually try to build all four libs, that sounds like a better option in long term.

@bharrisau
Copy link
Contributor

Most of those are empty archives just to keep the linker happy when it includes -lbacktrace.

@farcaller
Copy link
Member Author

Zinc is now using libstd.

posborne pushed a commit to posborne/zinc that referenced this issue May 22, 2015
examples: Fix blink demo on lpc17xx for new-build
mcoffin pushed a commit that referenced this issue Jul 3, 2015
stm32f4: switch GPIO to new ioregs macro
mcoffin pushed a commit that referenced this issue Jul 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants